Skip to content

Commit

Permalink
Merge pull request #18140 from unknownbrackets/x86-sc
Browse files Browse the repository at this point in the history
x86jit: Fix spill on sc in longer block
  • Loading branch information
hrydgard authored Sep 12, 2023
2 parents 9d058ef + 1fad623 commit 87a4344
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Core/MIPS/x86/CompLoadStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,12 @@ namespace MIPSComp {
break;

case 56: // sc
// Map before the jump in case any regs spill. Unlock happens inside CompITypeMemWrite().
// This is not a very common op, but it's in jit so memory breakpoints can trip.
gpr.Lock(rt, rs);
gpr.MapReg(rt, true, true);
gpr.MapReg(rs, true, false);

CMP(8, MDisp(X64JitConstants::CTXREG, -128 + offsetof(MIPSState, llBit)), Imm8(1));
skipStore = J_CC(CC_NE);

Expand Down

0 comments on commit 87a4344

Please sign in to comment.