mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-03 19:25:18 +02:00
armjit: Fix D-prefix sat clamp NAN handling.
They should leave NAN alone.
This commit is contained in:
@@ -194,7 +194,7 @@ namespace MIPSComp
|
||||
MOVI2F(S1, 1.0f, SCRATCHREG1);
|
||||
VCMP(fpr.V(vregs[i]), S0);
|
||||
VMRS_APSR(); // Move FP flags from FPSCR to APSR (regular flags).
|
||||
SetCC(CC_LE);
|
||||
SetCC(CC_LS);
|
||||
VMOV(fpr.V(vregs[i]), S0);
|
||||
SetCC(CC_AL);
|
||||
VCMP(fpr.V(vregs[i]), S1);
|
||||
@@ -209,7 +209,7 @@ namespace MIPSComp
|
||||
MOVI2F(S1, 1.0f, SCRATCHREG1);
|
||||
VCMP(fpr.V(vregs[i]), S0);
|
||||
VMRS_APSR(); // Move FP flags from FPSCR to APSR (regular flags).
|
||||
SetCC(CC_LT);
|
||||
SetCC(CC_LO);
|
||||
VMOV(fpr.V(vregs[i]), S0);
|
||||
SetCC(CC_AL);
|
||||
VCMP(fpr.V(vregs[i]), S1);
|
||||
|
||||
@@ -512,7 +512,7 @@ namespace MIPSInt
|
||||
case 0: d[i] = s[i]; break; //vmov
|
||||
case 1: d[i] = fabsf(s[i]); break; //vabs
|
||||
case 2: d[i] = -s[i]; break; //vneg
|
||||
// vsat0 changes -0.0 to +0.0.
|
||||
// vsat0 changes -0.0 to +0.0, both retain NAN.
|
||||
case 4: if (s[i] <= 0) d[i] = 0; else {if(s[i] > 1.0f) d[i] = 1.0f; else d[i] = s[i];} break; // vsat0
|
||||
case 5: if (s[i] < -1.0f) d[i] = -1.0f; else {if(s[i] > 1.0f) d[i] = 1.0f; else d[i] = s[i];} break; // vsat1
|
||||
case 16: d[i] = 1.0f / s[i]; break; //vrcp
|
||||
|
||||
Reference in New Issue
Block a user