From 0839ce59e17badf5630649034f22f7543b6e7f3a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 27 Nov 2014 01:04:52 -0800 Subject: [PATCH] x86jit: Apply dirty when reusing 1-reg VS. --- Core/MIPS/x86/RegCacheFPU.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/MIPS/x86/RegCacheFPU.cpp b/Core/MIPS/x86/RegCacheFPU.cpp index 0852d2649c..5a9c367b36 100644 --- a/Core/MIPS/x86/RegCacheFPU.cpp +++ b/Core/MIPS/x86/RegCacheFPU.cpp @@ -435,6 +435,9 @@ void FPURegCache::SimpleRegV(const u8 v, int flags) { MIPSCachedFPReg &vr = vregs[v]; // Special optimization: if it's in a single simd, we can keep it there. if (vr.lane == 1 && xregs[VSX(&v)].mipsRegs[1] == -1) { + if (flags & MAP_DIRTY) { + xregs[VSX(&v)].dirty = true; + } // Just change the lane to 0. vr.lane = 0; } else if (vr.lane != 0) { @@ -447,7 +450,9 @@ void FPURegCache::SimpleRegV(const u8 v, int flags) { } } else if (vr.away) { // There are no immediates in the FPR reg file, so we already had this in a register. Make dirty as necessary. - xregs[VX(v)].dirty = xregs[VX(v)].dirty || ((flags & MAP_DIRTY) != 0); + if (flags & MAP_DIRTY) { + xregs[VX(v)].dirty = true; + } _assert_msg_(JIT, vr.location.IsSimpleReg(), "not loaded and not simple."); } Invariant();