Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9791 from JosJuice/jitarm64-carbon
JitArm64: Fix clobbering LR in FakeLKExit
  • Loading branch information
degasus committed Jun 6, 2021
2 parents 684d09b + 4ef4ac4 commit fd4efd3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Core/Core/PowerPC/JitArm64/Jit.cpp
Expand Up @@ -398,6 +398,7 @@ void JitArm64::FakeLKExit(u32 exit_address_after_return)

// We may need to fake the BLR stack on inlined CALL instructions.
// Else we can't return to this location any more.
gpr.Lock(ARM64Reg::W30);
ARM64Reg after_reg = gpr.GetReg();
ARM64Reg code_reg = gpr.GetReg();
MOVI2R(after_reg, exit_address_after_return);
Expand All @@ -406,6 +407,7 @@ void JitArm64::FakeLKExit(u32 exit_address_after_return)
gpr.Unlock(after_reg, code_reg);

FixupBranch skip_exit = BL();
gpr.Unlock(ARM64Reg::W30);

// Write the regular exit node after the return.
JitBlock* b = js.curBlock;
Expand Down

0 comments on commit fd4efd3

Please sign in to comment.