diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 84c9611776..5735e06bb7 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -981,7 +981,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) // the start of the block in case our guess turns out wrong. for (int gqr : gqr_static) { - u32 value = GQR(gqr); + u32 value = GQR(PowerPC::ppcState, gqr); js.constantGqr[gqr] = value; CMP_or_TEST(32, PPCSTATE(spr[SPR_GQR0 + gqr]), Imm32(value)); J_CC(CC_NZ, target); diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp index 01461ca19b..b28ced4210 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp @@ -897,7 +897,7 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) js.pairedQuantizeAddresses.find(js.blockStart) == js.pairedQuantizeAddresses.end()) { int gqr = *code_block.m_gqr_used.begin(); - if (!code_block.m_gqr_modified[gqr] && !GQR(gqr)) + if (!code_block.m_gqr_modified[gqr] && !GQR(PowerPC::ppcState, gqr)) { LDR(IndexType::Unsigned, ARM64Reg::W0, PPC_REG, PPCSTATE_OFF_SPR(SPR_GQR0 + gqr)); FixupBranch no_fail = CBZ(ARM64Reg::W0); diff --git a/Source/Core/Core/PowerPC/PowerPC.h b/Source/Core/Core/PowerPC/PowerPC.h index 3f7b66c6ec..9e9bb5d6f1 100644 --- a/Source/Core/Core/PowerPC/PowerPC.h +++ b/Source/Core/Core/PowerPC/PowerPC.h @@ -250,7 +250,7 @@ void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst); #define CTR(ppc_state) (ppc_state).spr[SPR_CTR] #define SRR0(ppc_state) (ppc_state).spr[SPR_SRR0] #define SRR1(ppc_state) (ppc_state).spr[SPR_SRR1] -#define GQR(x) PowerPC::ppcState.spr[SPR_GQR0 + (x)] +#define GQR(ppc_state, x) (ppc_state).spr[SPR_GQR0 + (x)] #define TL PowerPC::ppcState.spr[SPR_TL] #define TU PowerPC::ppcState.spr[SPR_TU]