diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 004a5f57eb..0d2722fa5a 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -362,7 +362,7 @@ void Jit64::DoMergedBranch() if (next.OPCD == 16) // bcx { if (next.LK) - MOV(32, M(&LR), Imm32(nextPC + 4)); + MOV(32, PPCSTATE(spr[SPR_LR]), Imm32(nextPC + 4)); u32 destination; if (next.AA) @@ -374,18 +374,18 @@ void Jit64::DoMergedBranch() else if ((next.OPCD == 19) && (next.SUBOP10 == 528)) // bcctrx { if (next.LK) - MOV(32, M(&LR), Imm32(nextPC + 4)); - MOV(32, R(RSCRATCH), M(&CTR)); + MOV(32, PPCSTATE(spr[SPR_LR]), Imm32(nextPC + 4)); + MOV(32, R(RSCRATCH), PPCSTATE(spr[SPR_CTR])); AND(32, R(RSCRATCH), Imm32(0xFFFFFFFC)); WriteExitDestInRSCRATCH(next.LK, nextPC + 4); } else if ((next.OPCD == 19) && (next.SUBOP10 == 16)) // bclrx { - MOV(32, R(RSCRATCH), M(&LR)); + MOV(32, R(RSCRATCH), PPCSTATE(spr[SPR_LR])); if (!m_enable_blr_optimization) AND(32, R(RSCRATCH), Imm32(0xFFFFFFFC)); if (next.LK) - MOV(32, M(&LR), Imm32(nextPC + 4)); + MOV(32, PPCSTATE(spr[SPR_LR]), Imm32(nextPC + 4)); WriteBLRExit(); } else diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp index c5cbb6447f..f730ca76dc 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp @@ -17,6 +17,7 @@ #include "Core/HW/DSP.h" #include "Core/HW/Memmap.h" #include "Core/PowerPC/Jit64/JitRegCache.h" +#include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h" #include "Core/PowerPC/JitInterface.h" #include "Core/PowerPC/PowerPC.h" @@ -355,7 +356,7 @@ void Jit64::dcbz(UGeckoInstruction inst) SwitchToFarCode(); SetJumpTarget(slow); } - MOV(32, M(&PC), Imm32(js.compilerPC)); + MOV(32, PPCSTATE(pc), Imm32(js.compilerPC)); BitSet32 registersInUse = CallerSavedRegistersInUse(); ABI_PushRegistersAndAdjustStack(registersInUse, 0); ABI_CallFunctionR(PowerPC::ClearCacheLine, RSCRATCH);