Skip to content
Permalink
Browse files

interp: Handle invalid swizzle in vsge/vslt.

  • Loading branch information...
unknownbrackets committed Mar 26, 2019
1 parent dfd8094 commit dffa238611c3a3377dbad36827e9241f00075cfc
Showing with 8 additions and 8 deletions.
  1. +8 −8 Core/MIPS/MIPSIntVFPU.cpp
@@ -1757,14 +1757,12 @@ namespace MIPSInt
}

void Int_Vsge(MIPSOpcode op) {
float s[4], t[4], d[4];
int vt = _VT;
int vs = _VS;
int vd = _VD;
VectorSize sz = GetVecSize(op);
int numElements = GetNumVectorElements(sz);
float s[4];
float t[4];
float d[4];
ReadVector(s, sz, vs);
ApplySwizzleS(s, sz);
ReadVector(t, sz, vt);
@@ -1775,21 +1773,21 @@ namespace MIPSInt
else
d[i] = s[i] >= t[i] ? 1.0f : 0.0f;
}
ApplyPrefixD(d, sz);
RetainInvalidSwizzleST(d, sz);
// The clamp cannot matter, so skip it.
ApplyPrefixD(d, sz, true);
WriteVector(d, sz, vd);
PC += 4;
EatPrefixes();
}

void Int_Vslt(MIPSOpcode op) {
float s[4], t[4], d[4];
int vt = _VT;
int vs = _VS;
int vd = _VD;
VectorSize sz = GetVecSize(op);
int numElements = GetNumVectorElements(sz);
float s[4];
float t[4];
float d[4];
ReadVector(s, sz, vs);
ApplySwizzleS(s, sz);
ReadVector(t, sz, vt);
@@ -1800,7 +1798,9 @@ namespace MIPSInt
else
d[i] = s[i] < t[i] ? 1.0f : 0.0f;
}
ApplyPrefixD(d, sz);
RetainInvalidSwizzleST(d, sz);
// The clamp cannot matter, so skip it.
ApplyPrefixD(d, sz, true);
WriteVector(d, sz, vd);
PC += 4;
EatPrefixes();

0 comments on commit dffa238

Please sign in to comment.
You can’t perform that action at this time.