Merge pull request #12081 from JosJuice/jitarm64-debug-exit-pc

JitArm64: Store PC on debug exit
This commit is contained in:
Admiral H. Curtiss 2023-09-10 02:10:29 +02:00 committed by GitHub
commit 1a0f0e7e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,10 +207,16 @@ void JitArm64::GenerateAsm()
// We can safely assume that downcount >= 1
B(dispatcher_no_check);
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);
if (enable_debugging)
SetJumpTarget(debug_exit);
// Reset the stack pointer, since the BLR optimization may have pushed things onto the stack
// without popping them.