From b4e6a715fcb1d3688cbae808ebb0a54a2af92d85 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Thu, 3 Mar 2022 15:59:22 +0000 Subject: [PATCH] EE/JIT: Flush const on LDL/LDR instructions --- pcsx2/x86/ix86-32/iR5900LoadStore.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp index c942bb7ea9..9c5b2ec2b8 100644 --- a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp +++ b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp @@ -535,6 +535,12 @@ void recLDL() #ifdef LOADSTORE_RECOMPILE int t2reg; + if (GPR_IS_CONST1(_Rt_)) + { + _flushConstReg(_Rt_); + _eeOnWriteReg(_Rt_, 0); + } + if (GPR_IS_CONST1(_Rs_)) { u32 srcadr = g_cpuConstRegs[_Rs_].UL[0] + _Imm_; @@ -610,6 +616,12 @@ void recLDR() #ifdef LOADSTORE_RECOMPILE int t2reg; + + if (GPR_IS_CONST1(_Rt_)) + { + _flushConstReg(_Rt_); + _eeOnWriteReg(_Rt_, 0); + } if (GPR_IS_CONST1(_Rs_)) {