diff options
| author | JosJuice <josjuice@gmail.com> | 2023-07-31 16:50:49 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2023-07-31 16:50:49 +0200 |
| commit | 262a3be08a7c556c275a857190a494ce94de3da8 (patch) | |
| tree | f079c75823ad27ddbfd27ecaa00f78a6b435116a /Source | |
| parent | bed3874497aeb6fd18b15c63291b92eb7d2d50f9 (diff) | |
JitArm64: Store PC on debug exit
Should fix https://bugs.dolphin-emu.org/issues/13178.
Jit64 doesn't need to do this because it stores PC directly into
ppcState instead of first storing it in a register.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp index 03b3c7487d..9843f06d09 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp @@ -223,10 +223,16 @@ void JitArm64::GenerateAsm() // We can safely assume that downcount >= 1 B(dispatcher_no_check); - dispatcher_exit = GetCodePtr(); - SetJumpTarget(exit); if (enable_debugging) + { SetJumpTarget(debug_exit); + static_assert(PPCSTATE_OFF(pc) <= 252); + static_assert(PPCSTATE_OFF(pc) + 4 == PPCSTATE_OFF(npc)); + STP(IndexType::Signed, DISPATCHER_PC, DISPATCHER_PC, PPC_REG, PPCSTATE_OFF(pc)); + } + + dispatcher_exit = GetCodePtr(); + SetJumpTarget(exit); // Reset the stack pointer, since the BLR optimization may have pushed things onto the stack // without popping them. |
