Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12081 from JosJuice/jitarm64-debug-exit-pc
JitArm64: Store PC on debug exit
  • Loading branch information
AdmiralCurtiss committed Sep 10, 2023
2 parents 5e0cf79 + 262a3be commit 1a0f0e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp
Expand Up @@ -207,10 +207,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.
Expand Down

0 comments on commit 1a0f0e7

Please sign in to comment.