From 6a8287ea9fd1f80cea9bb98aea8fb2693fb84237 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Wed, 3 Nov 2021 17:28:10 +0000 Subject: [PATCH] EE JIT: Backup shift on LDR/L if rs==rt --- pcsx2/x86/ix86-32/iR5900LoadStore.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp index 7390a02367..88f49b6f90 100644 --- a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp +++ b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp @@ -538,6 +538,11 @@ void recLDL() if (GPR_IS_CONST1(_Rs_)) { u32 srcadr = g_cpuConstRegs[_Rs_].UL[0] + _Imm_; + + // If _Rs_ is equal to _Rt_ we need to put the shift in to eax since it won't take the CONST path + if (_Rs_ == _Rt_) + xMOV(calleeSavedReg1d, srcadr); + srcadr &= ~0x07; t2reg = vtlb_DynGenRead64_Const(64, srcadr, -1); @@ -609,6 +614,11 @@ void recLDR() if (GPR_IS_CONST1(_Rs_)) { u32 srcadr = g_cpuConstRegs[_Rs_].UL[0] + _Imm_; + + // If _Rs_ is equal to _Rt_ we need to put the shift in to eax since it won't take the CONST path + if(_Rs_ == _Rt_) + xMOV(calleeSavedReg1d, srcadr); + srcadr &= ~0x07; t2reg = vtlb_DynGenRead64_Const(64, srcadr, -1);