Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JIT: fix regression in ps_sel
My code didn't maintain correct semantics with floating-point NaNs (a < b is
not the same as "not a >= b" in float), which seems to have broken FIFA 12.
  • Loading branch information
FioraAeterna committed Sep 18, 2014
1 parent 8b151d6 commit 9ab816e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Source/Core/Core/PowerPC/Jit64/Jit_Paired.cpp
Expand Up @@ -43,10 +43,11 @@ void Jit64::ps_sel(UGeckoInstruction inst)

if (cpu_info.bSSE4_1)
{
PXOR(XMM0, R(XMM0));
CMPPD(XMM0, fpr.R(a), LT); // XMM0 = XMM0 >= 0 ? all 1s : all 0s
MOVAPD(XMM1, fpr.R(b));
BLENDVPD(XMM1, fpr.R(c));
MOVAPD(XMM0, fpr.R(a));
PXOR(XMM1, R(XMM1));
CMPPD(XMM0, R(XMM1), LT); // XMM0 = XMM0 < 0 ? all 1s : all 0s
MOVAPD(XMM1, fpr.R(c));
BLENDVPD(XMM1, fpr.R(b));
}
else
{
Expand Down

0 comments on commit 9ab816e

Please sign in to comment.