diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-10-14 15:11:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-14 09:11:15 +0200 |
| commit | 3d0423acf703be7e0e7b004ee85630f6684bf72e (patch) | |
| tree | ffd0958823f0cd8a4a2ac2cccfea53ed6ff2350d /src/emu | |
| parent | 3ad0ddfe880ee2edbc6cd05ce9cb8acb82b34331 (diff) | |
| download | box64-3d0423acf703be7e0e7b004ee85630f6684bf72e.tar.gz box64-3d0423acf703be7e0e7b004ee85630f6684bf72e.zip | |
Added preliminary unit test runner (#3045)
* Added preliminary unit test runner * Set .text section address * Added support for added custom memory regions * Move json.h to include * Display banner * Added support for custom memory data * Added the ability to include path in nasm * Print env variables
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64run.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/emu/x64run.c b/src/emu/x64run.c index d1a37337..7f933920 100644 --- a/src/emu/x64run.c +++ b/src/emu/x64run.c @@ -2043,9 +2043,16 @@ x64emurun: case 0xF4: /* HLT */ // this is a privilege opcode... #ifndef TEST_INTERPRETER - EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0xbad0); - STEP; + if (!box64_unittest_mode) { + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0xbad0); + STEP; + } else #endif + { + printf_log(LOG_DEBUG, "HLT encountered in interpreter, exiting\n"); + emu->quit = 1; + goto fini; + } break; case 0xF5: /* CMC */ CHECK_FLAGS(emu); |