diff options
| -rwxr-xr-x | src/dynarec/dynarec.c | 10 | ||||
| -rwxr-xr-x | src/include/dynarec.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/dynarec/dynarec.c b/src/dynarec/dynarec.c index be7c6a31..f0b0eeb5 100755 --- a/src/dynarec/dynarec.c +++ b/src/dynarec/dynarec.c @@ -95,8 +95,11 @@ void DynaCall(x64emu_t* emu, uintptr_t addr) 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! #ifdef DYNAREC - if(box64_dynarec_test) + if(box64_dynarec_test) { + if(emu->test.clean) + x64test_check(emu, R_RIP); emu->test.clean = 0; + } #endif } } @@ -186,8 +189,11 @@ int DynaRun(x64emu_t* emu) if(sigsetjmp((struct __jmp_buf_tag*)ejb->jmpbuf, 1)) printf_log(LOG_DEBUG, "Setjmp DynaRun, fs=0x%x\n", ejb->emu->segs[_FS]); #ifdef DYNAREC - if(box64_dynarec_test) + if(box64_dynarec_test) { + if(emu->test.clean) + x64test_check(emu, R_RIP); emu->test.clean = 0; + } #endif } } diff --git a/src/include/dynarec.h b/src/include/dynarec.h index 677427bc..64da6041 100755 --- a/src/include/dynarec.h +++ b/src/include/dynarec.h @@ -6,6 +6,6 @@ typedef struct x64emu_s x64emu_t; void DynaCall(x64emu_t* emu, uintptr_t addr); // try to use DynaRec... Fallback to EmuCall if no dynarec available void x64test_init(x64emu_t* ref, uintptr_t ip); -void x64test_check(x64emu_t* ref); +void x64test_check(x64emu_t* ref, uintptr_t ip); #endif // __DYNAREC_H_ \ No newline at end of file |