summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorFiora <fioraaeterna@gmail.com>2014-08-28 11:18:33 -0700
committerFiora <fioraaeterna@gmail.com>2014-08-28 11:19:09 -0700
commit7929f2f03381a278c30349afb2e358b697bc289d (patch)
treec65943c639b116716786486efce24c3dfe682743 /Source/Core
parent0217fb200805c2c10fbb8f395d88d86137731c6d (diff)
JIT: make fprf conditional in fcmp, just like the other instructions
Missed in the FPRF merge (it didn't break anything, but it's probably a bit slower and not consistent with the others).
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
index 18bb8e94db..52ca8791f9 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
@@ -242,11 +242,13 @@ void Jit64::fcmpx(UGeckoInstruction inst)
int a = inst.FA;
int b = inst.FB;
int crf = inst.CRFD;
+ bool fprf = Core::g_CoreStartupParameter.bEnableFPRF && js.op->wantsFPRF;
fpr.Lock(a,b);
fpr.BindToRegister(b, true);
- AND(32, M(&FPSCR), Imm32(~FPRF_MASK));
+ if (fprf)
+ AND(32, M(&FPSCR), Imm32(~FPRF_MASK));
// Are we masking sNaN invalid floating point exceptions? If not this could crash if we don't handle the exception?
UCOMISD(fpr.R(b).GetSimpleReg(), fpr.R(a));
@@ -270,13 +272,15 @@ void Jit64::fcmpx(UGeckoInstruction inst)
}
MOV(64, R(RAX), Imm64(PPCCRToInternal(CR_EQ)));
- OR(32, M(&FPSCR), Imm32(CR_EQ << FPRF_SHIFT));
+ if (fprf)
+ OR(32, M(&FPSCR), Imm32(CR_EQ << FPRF_SHIFT));
continue1 = J();
SetJumpTarget(pNaN);
MOV(64, R(RAX), Imm64(PPCCRToInternal(CR_SO)));
- OR(32, M(&FPSCR), Imm32(CR_SO << FPRF_SHIFT));
+ if (fprf)
+ OR(32, M(&FPSCR), Imm32(CR_SO << FPRF_SHIFT));
if (a != b)
{
@@ -284,12 +288,14 @@ void Jit64::fcmpx(UGeckoInstruction inst)
SetJumpTarget(pGreater);
MOV(64, R(RAX), Imm64(PPCCRToInternal(CR_GT)));
- OR(32, M(&FPSCR), Imm32(CR_GT << FPRF_SHIFT));
+ if (fprf)
+ OR(32, M(&FPSCR), Imm32(CR_GT << FPRF_SHIFT));
continue3 = J();
SetJumpTarget(pLesser);
MOV(64, R(RAX), Imm64(PPCCRToInternal(CR_LT)));
- OR(32, M(&FPSCR), Imm32(CR_LT << FPRF_SHIFT));
+ if (fprf)
+ OR(32, M(&FPSCR), Imm32(CR_LT << FPRF_SHIFT));
}
SetJumpTarget(continue1);