Permalink
Browse files

Jit_SystemRegisters: Correct behaviour for mtspr SPR_HID0

BTR modifies its argument
  • Loading branch information...
MerryMage committed Oct 13, 2018
1 parent 22c6343 commit e7a65c31a8c0ebc76453cfdb4624e2703ff0f896
Showing with 3 additions and 3 deletions.
  1. +3 −3 Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
@@ -238,9 +238,9 @@ void Jit64::mtspr(UGeckoInstruction inst)
case SPR_HID0:
{
gpr.BindToRegister(d, true, false);
BTR(32, gpr.R(d), Imm8(31 - 20)); // ICFI
MOV(32, PPCSTATE(spr[iIndex]), gpr.R(d));
MOV(32, R(RSCRATCH), gpr.R(d));
BTR(32, R(RSCRATCH), Imm8(31 - 20)); // ICFI
MOV(32, PPCSTATE(spr[iIndex]), R(RSCRATCH));
FixupBranch dont_reset_icache = J_CC(CC_NC);
BitSet32 regs = CallerSavedRegistersInUse();
ABI_PushRegistersAndAdjustStack(regs, 0);

0 comments on commit e7a65c3

Please sign in to comment.