From 58573cd4b4d7b95f675dbbde559f9708311b82e5 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 26 Mar 2019 21:20:05 -0700 Subject: [PATCH] interp: Handle invalid swizzle for vmin/vmax. --- Core/MIPS/MIPSIntVFPU.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index 424b646225..44cf2816b3 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -1767,6 +1767,7 @@ namespace MIPSInt } void Int_Vminmax(MIPSOpcode op) { + FloatBits s, t, d; int vt = _VT; int vs = _VS; int vd = _VD; @@ -1774,9 +1775,6 @@ namespace MIPSInt VectorSize sz = GetVecSize(op); int numElements = GetNumVectorElements(sz); - FloatBits s; - FloatBits t; - FloatBits d; ReadVector(s.f, sz, vs); ApplySwizzleS(s.f, sz); ReadVector(t.f, sz, vt); @@ -1822,6 +1820,7 @@ namespace MIPSInt EatPrefixes(); return; } + RetainInvalidSwizzleST(d.f, sz); ApplyPrefixD(d.f, sz); WriteVector(d.f, sz, vd); PC += 4; @@ -2004,6 +2003,7 @@ namespace MIPSInt currentMIPS->vfpuCtrl[VFPU_CTRL_DPREFIX] = lastmask | lastsat; ApplyPrefixD(d, sz); } else { + RetainInvalidSwizzleST(d, sz); ApplyPrefixD(d, sz); } WriteVector(d, sz, vd);