diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-01-27 20:42:32 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-01-27 20:42:32 +0100 |
| commit | f9c09293bf5f8da518c995bef7d768f1f1f65e47 (patch) | |
| tree | e9556da7d0c8c44d42c54d6733244976b66280c7 /src/dynarec | |
| parent | cdffe2388ea2dbafd4c82e304fc228eaefe4ac94 (diff) | |
| download | box64-f9c09293bf5f8da518c995bef7d768f1f1f65e47.tar.gz box64-f9c09293bf5f8da518c995bef7d768f1f1f65e47.zip | |
Added BOX64_IGNOREINT3 env. var. to ignore INT3 in the code ([RCFILE] too)
Diffstat (limited to 'src/dynarec')
| -rw-r--r-- | src/dynarec/arm64/dynarec_arm64_00.c | 28 | ||||
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_00_3.c | 28 |
2 files changed, 26 insertions, 30 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_00.c b/src/dynarec/arm64/dynarec_arm64_00.c index 59cbe4ad..d1c44bab 100644 --- a/src/dynarec/arm64/dynarec_arm64_00.c +++ b/src/dynarec/arm64/dynarec_arm64_00.c @@ -2122,23 +2122,21 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin } } } else { - #if 1 INST_NAME("INT 3"); - // check if TRAP signal is handled - TABLE64(x1, (uintptr_t)my_context); - MOV32w(x2, offsetof(box64context_t, signals[SIGTRAP])); - LDRx_REG(x3, x1, x2); - //LDRx_U12(x3, x1, offsetof(box64context_t, signals[SIGTRAP])); - CMPSx_U12(x3, 0); - B_NEXT(cEQ); - GETIP(ip); - STORE_XEMU_CALL(xRIP); - CALL(native_int3, -1); - LOAD_XEMU_CALL(xRIP); + if(!box64_ignoreint3) { + // check if TRAP signal is handled + TABLE64(x1, (uintptr_t)my_context); + MOV32w(x2, offsetof(box64context_t, signals[SIGTRAP])); + LDRx_REG(x3, x1, x2); + //LDRx_U12(x3, x1, offsetof(box64context_t, signals[SIGTRAP])); + CMPSx_U12(x3, 0); + B_NEXT(cEQ); + GETIP(ip); + STORE_XEMU_CALL(xRIP); + CALL(native_int3, -1); + LOAD_XEMU_CALL(xRIP); + } break; - #else - DEFAULT; - #endif } break; case 0xCD: diff --git a/src/dynarec/rv64/dynarec_rv64_00_3.c b/src/dynarec/rv64/dynarec_rv64_00_3.c index fa074293..f11f68c0 100644 --- a/src/dynarec/rv64/dynarec_rv64_00_3.c +++ b/src/dynarec/rv64/dynarec_rv64_00_3.c @@ -374,22 +374,20 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int } } } else { - #if 1 - INST_NAME("INT 3"); - // check if TRAP signal is handled - LD(x1, xEmu, offsetof(x64emu_t, context)); - MOV64x(x2, offsetof(box64context_t, signals[SIGTRAP])); - ADD(x2, x2, x1); - LD(x3, x2, 0); - CBZ_NEXT(x3); - GETIP(ip); - STORE_XEMU_CALL(x3); - CALL(native_int3, -1); - LOAD_XEMU_CALL(); + if(!box64_ignoreint3) { + INST_NAME("INT 3"); + // check if TRAP signal is handled + LD(x1, xEmu, offsetof(x64emu_t, context)); + MOV64x(x2, offsetof(box64context_t, signals[SIGTRAP])); + ADD(x2, x2, x1); + LD(x3, x2, 0); + CBZ_NEXT(x3); + GETIP(ip); + STORE_XEMU_CALL(x3); + CALL(native_int3, -1); + LOAD_XEMU_CALL(); + } break; - #else - DEFAULT; - #endif } break; case 0xCD: |