interp: Correct vocp prefix handling.

Also, guess that vsocp also applies prefixes.  See #5549.
This commit is contained in:
Unknown W. Brackets committed 2019-02-21 19:02:16 -08:00
1 parent b1146d8d9d
commit d7f40afd9d
4 files changed
+7 -7

No files matched your search

-2
View File
@@ -2302,8 +2302,6 @@ namespace MIPSComp
int n = GetNumVectorElements(sz);
u8 sregs[4], dregs[4];
// Actually, not sure that this instruction accepts an S prefix. We don't apply it in the
// interpreter. But whatever.
GetVectorRegsPrefixS(sregs, sz, _VS);
GetVectorRegsPrefixD(dregs, sz, _VD);
-2
View File
@@ -1953,8 +1953,6 @@ namespace MIPSComp {
int n = GetNumVectorElements(sz);
u8 sregs[4], dregs[4];
// Actually, not sure that this instruction accepts an S prefix. We don't apply it in the
// interpreter. But whatever.
GetVectorRegsPrefixS(sregs, sz, _VS);
GetVectorRegsPrefixD(dregs, sz, _VD);
+3 -2
View File
@@ -1840,12 +1840,13 @@ namespace MIPSComp {
DISABLE;
}
// Vector one's complement
// d[N] = 1.0 - s[N]
VectorSize sz = GetVecSize(op);
int n = GetNumVectorElements(sz);
u8 sregs[4], dregs[4];
// Actually, not sure that this instruction accepts an S prefix. We don't apply it in the
// interpreter. But whatever.
GetVectorRegsPrefixS(sregs, sz, _VS);
GetVectorRegsPrefixD(dregs, sz, _VD);
+4 -1
View File
@@ -549,6 +549,7 @@ namespace MIPSInt
int vs = _VS;
VectorSize sz = GetVecSize(op);
ReadVector(s, sz, vs);
ApplySwizzleS(s, sz);
for (int i = 0; i < GetNumVectorElements(sz); i++)
{
// Always positive NaN.
@@ -567,6 +568,7 @@ namespace MIPSInt
int vs = _VS;
VectorSize sz = GetVecSize(op);
ReadVector(s, sz, vs);
ApplySwizzleS(s, sz);
int n = GetNumVectorElements(sz);
float x = s[0];
d[0] = nanclamp(1.0f - x, 0.0f, 1.0f);
@@ -577,7 +579,8 @@ namespace MIPSInt
d[2] = nanclamp(1.0f - y, 0.0f, 1.0f);
d[3] = nanclamp(y, 0.0f, 1.0f);
outSize = V_Quad;
}
}
ApplyPrefixD(d, sz);
WriteVector(d, outSize, vd);
PC += 4;
EatPrefixes();