mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 10:13:43 +01:00
x86jit: Fix vsat0 saturate.
This commit is contained in:
1 parent
181adde6f1
commit
bcac804cc5
1 file changed
+2
-5
@@ -622,14 +622,11 @@ void X64JitBackend::CompIR_FSat(IRInst inst) {
|
||||
|
||||
// Now for NAN, we want known first again.
|
||||
// Unfortunately, this will retain -0.0, which we'll fix next.
|
||||
XORPS(tempReg, R(tempReg));
|
||||
XORPS(regs_.FX(inst.dest), regs_.F(inst.dest));
|
||||
MAXSS(tempReg, regs_.F(inst.dest));
|
||||
|
||||
// Important: this should clamp -0.0 to +0.0.
|
||||
XORPS(regs_.FX(inst.dest), regs_.F(inst.dest));
|
||||
CMPEQSS(regs_.FX(inst.dest), R(tempReg));
|
||||
// This will zero all bits if it was -0.0, and keep them otherwise.
|
||||
ANDNPS(regs_.FX(inst.dest), R(tempReg));
|
||||
ADDSS(regs_.FX(inst.dest), R(tempReg));
|
||||
break;
|
||||
|
||||
case IROp::FSatMinus1_1:
|
||||
|
||||
Reference in new issue
Block a user