diff options
| author | André Zwing <nerv@dawncrow.de> | 2025-05-30 23:58:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-30 23:58:48 +0200 |
| commit | 89e470d59c9c0b68a5121fdb9d3cf68aa8c60a99 (patch) | |
| tree | 650c30bafd030a546430dce952e05faf0af5e279 | |
| parent | 7a76430e87815601c20048633e1ff054f1595270 (diff) | |
| parent | ab5d2eba64b29501c4ed369fa2d95447c07f3761 (diff) | |
| download | box64-89e470d59c9c0b68a5121fdb9d3cf68aa8c60a99.tar.gz box64-89e470d59c9c0b68a5121fdb9d3cf68aa8c60a99.zip | |
Merge pull request #2692 from ksco/wow64
[WOW64] Improved RIP handling on INT n
| -rw-r--r-- | src/dynarec/arm64/dynarec_arm64_00.c | 2 | ||||
| -rw-r--r-- | src/emu/x64run.c | 2 | ||||
| -rw-r--r-- | wow64/wowbox64.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_00.c b/src/dynarec/arm64/dynarec_arm64_00.c index 84f134fc..73e544ce 100644 --- a/src/dynarec/arm64/dynarec_arm64_00.c +++ b/src/dynarec/arm64/dynarec_arm64_00.c @@ -2649,7 +2649,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin #ifdef _WIN32 NOTEST(x1); SMEND(); - GETIP(addr); + GETIP(ip); STORE_XEMU_CALL(xRIP); MOV32w(x1, u8); CALL_S(native_int, -1); diff --git a/src/emu/x64run.c b/src/emu/x64run.c index 078a7ea9..8b21ca83 100644 --- a/src/emu/x64run.c +++ b/src/emu/x64run.c @@ -1532,9 +1532,11 @@ x64emurun: case 0xCD: /* INT n */ tmp8u = F8; #ifdef _WIN32 + #ifndef TEST_INTERPRETER EmitInterruption(emu, tmp8u, (void*)R_RIP); STEP; addr = R_RIP; + #endif #else // this is a privilege opcode... if(box64_wine && tmp8u==0x2D) { diff --git a/wow64/wowbox64.c b/wow64/wowbox64.c index f0d9fd4b..b6e83e9e 100644 --- a/wow64/wowbox64.c +++ b/wow64/wowbox64.c @@ -349,8 +349,6 @@ NTSTATUS WINAPI BTCpuTurboThunkControl(ULONG enable) void EmitInterruptionImpl(x64emu_t *emu, int code) { - int inst_off = box64env.dynarec ? 2 : 0; - if (code == 0x2e) /* NT syscall */ { WOW64_CPURESERVED *cpu = NtCurrentTeb()->TlsSlots[WOW64_TLS_CPURESERVED]; @@ -358,9 +356,9 @@ void EmitInterruptionImpl(x64emu_t *emu, int code) int id = R_EAX; BOOL is_unix_call = FALSE; - if (ULongToPtr(R_RIP-inst_off) == &unxcode) + if (ULongToPtr(R_RIP) == &unxcode) is_unix_call = TRUE; - else if (ULongToPtr(R_RIP-inst_off) != &bopcode) + else if (ULongToPtr(R_RIP) != &bopcode) return; R_RIP = Pop32(emu); |