diff --git a/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStorePaired.cpp b/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStorePaired.cpp index 6742e1ccc5..e0e485903a 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStorePaired.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStorePaired.cpp @@ -35,9 +35,21 @@ void JitArm::psq_l(UGeckoInstruction inst) UBFX(R11, R11, 24, 6); // Scale LSL(R11, R11, 2); - MOVI2R(R10, (u32)offset); - if (inst.RA || update) // Always uses the register on update - ADD(R10, R10, gpr.R(inst.RA)); + Operand2 off; + if (TryMakeOperand2(offset, off)) + { + if (inst.RA || update) + ADD(R10, gpr.R(inst.RA), off); + else + MOV(R10, off); + } + else + { + MOVI2R(R10, (u32)offset); + if (inst.RA || update) // Always uses the register on update + ADD(R10, R10, gpr.R(inst.RA)); + } + if (update) MOV(gpr.R(inst.RA), R10); MOVI2R(R14, (u32)asm_routines.pairedLoadQuantized); @@ -126,14 +138,19 @@ void JitArm::psq_st(UGeckoInstruction inst) UBFX(R11, R11, 8, 6); // Scale LSL(R11, R11, 2); - if (inst.RA || update) // Always uses the register on update + Operand2 off; + if (TryMakeOperand2(offset, off)) { - MOVI2R(R14, offset); - ADD(R10, gpr.R(inst.RA), R14); + if (inst.RA || update) + ADD(R10, gpr.R(inst.RA), off); + else + MOV(R10, off); } else { MOVI2R(R10, (u32)offset); + if (inst.RA || update) // Always uses the register on update + ADD(R10, R10, gpr.R(inst.RA)); } if (update)