diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-04-19 14:27:52 +0000 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-04-19 14:28:37 +0000 |
| commit | 9d6835737be2685e69d10c00d93021aac722bfd8 (patch) | |
| tree | eb9ad3b8ac8ca4e677653764933ce98c504feb1f /src | |
| parent | 1b4625ceddc7108c532fd91401f08fedab19a55d (diff) | |
| download | box64-9d6835737be2685e69d10c00d93021aac722bfd8.tar.gz box64-9d6835737be2685e69d10c00d93021aac722bfd8.zip | |
[DYNAREC] Fixed faux-positive on DYNAREC_TEST when unimplemented opcode in dynarec are encountered
Diffstat (limited to 'src')
| -rwxr-xr-x | src/dynarec/dynarec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dynarec/dynarec.c b/src/dynarec/dynarec.c index 657f4323..16d83e5f 100755 --- a/src/dynarec/dynarec.c +++ b/src/dynarec/dynarec.c @@ -94,6 +94,8 @@ void DynaCall(x64emu_t* emu, uintptr_t addr) if(sigsetjmp((struct __jmp_buf_tag*)ejb->jmpbuf, 1)) { printf_log(LOG_DEBUG, "Setjmp DynaCall, fs=0x%x\n", ejb->emu->segs[_FS]); addr = R_RIP; // not sure if it should still be inside DynaCall! + if(box64_dynarec_test) + emu->test.clean = 0; } } } @@ -118,6 +120,8 @@ void DynaCall(x64emu_t* emu, uintptr_t addr) // no block, of block doesn't have DynaRec content (yet, temp is not null) // Use interpreter (should use single instruction step...) dynarec_log(LOG_DEBUG, "%04d|Calling Interpreter @%p, emu=%p\n", GetTID(), (void*)R_RIP, emu); + if(box64_dynarec_test) + emu->test.clean = 0; Run(emu, 1); } else { dynarec_log(LOG_DEBUG, "%04d|Calling DynaRec Block @%p (%p) of %d x64 instructions emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize ,emu); @@ -179,6 +183,8 @@ int DynaRun(x64emu_t* emu) #endif if(sigsetjmp((struct __jmp_buf_tag*)ejb->jmpbuf, 1)) printf_log(LOG_DEBUG, "Setjmp DynaRun, fs=0x%x\n", ejb->emu->segs[_FS]); + if(box64_dynarec_test) + emu->test.clean = 0; } } #ifdef DYNAREC @@ -193,6 +199,8 @@ int DynaRun(x64emu_t* emu) // no block, of block doesn't have DynaRec content (yet, temp is not null) // Use interpreter (should use single instruction step...) dynarec_log(LOG_DEBUG, "%04d|Running Interpreter @%p, emu=%p\n", GetTID(), (void*)R_RIP, emu); + if(box64_dynarec_test) + emu->test.clean = 0; Run(emu, 1); } else { dynarec_log(LOG_DEBUG, "%04d|Running DynaRec Block @%p (%p) of %d x64 insts emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize, emu); |