interp: Handle invalid swizzle for vmin/vmax.

This commit is contained in:
Unknown W. Brackets 2019-03-26 21:20:05 -07:00
parent e8c060bb5f
commit 58573cd4b4

View file

@ -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);