Don't chop the float in vscmp, don't branch.

This commit is contained in:
Unknown W. Brackets 2012-12-21 15:23:01 -08:00
parent 8c267b0105
commit 8964ebcfd9

View File

@ -1495,10 +1495,8 @@ namespace MIPSInt
ApplySwizzleT(t, sz); ApplySwizzleT(t, sz);
int n = GetNumVectorElements(sz); int n = GetNumVectorElements(sz);
for (int i = 0; i < n ; i++) { for (int i = 0; i < n ; i++) {
int a=s[i] - t[i]; float a = s[i] - t[i];
if (a > 0) d[i]=1; d[i] = (0.0 < a) - (a < 0.0);
else if (a < 0) d[i]=-1;
else d[i]=0;
} }
ApplyPrefixD(d, sz); ApplyPrefixD(d, sz);
WriteVector(d, sz, vd); WriteVector(d, sz, vd);