Jit_FloatingPoint: Use MConst for constants

This commit is contained in:
MerryMage 2017-03-19 12:39:10 +00:00
parent ff441efc26
commit 0fe234ec9b
1 changed files with 10 additions and 10 deletions

View File

@ -108,7 +108,7 @@ void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm_out, X64Reg xmm, X64Re
UCOMISD(xmm, R(xmm)); UCOMISD(xmm, R(xmm));
fixups.push_back(J_CC(CC_P)); fixups.push_back(J_CC(CC_P));
} }
MOVDDUP(xmm, M(psGeneratedQNaN)); MOVDDUP(xmm, MConst(psGeneratedQNaN));
for (FixupBranch fixup : fixups) for (FixupBranch fixup : fixups)
SetJumpTarget(fixup); SetJumpTarget(fixup);
FixupBranch done = J(true); FixupBranch done = J(true);
@ -127,7 +127,7 @@ void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm_out, X64Reg xmm, X64Re
SwitchToFarCode(); SwitchToFarCode();
SetJumpTarget(handle_nan); SetJumpTarget(handle_nan);
_assert_msg_(DYNA_REC, clobber == XMM0, "BLENDVPD implicitly uses XMM0"); _assert_msg_(DYNA_REC, clobber == XMM0, "BLENDVPD implicitly uses XMM0");
BLENDVPD(xmm, M(psGeneratedQNaN)); BLENDVPD(xmm, MConst(psGeneratedQNaN));
for (u32 x : inputs) for (u32 x : inputs)
{ {
avx_op(&XEmitter::VCMPPD, &XEmitter::CMPPD, clobber, fpr.R(x), fpr.R(x), CMP_UNORD); avx_op(&XEmitter::VCMPPD, &XEmitter::CMPPD, clobber, fpr.R(x), fpr.R(x), CMP_UNORD);
@ -151,7 +151,7 @@ void Jit64::HandleNaNs(UGeckoInstruction inst, X64Reg xmm_out, X64Reg xmm, X64Re
SetJumpTarget(handle_nan); SetJumpTarget(handle_nan);
MOVAPD(tmp, R(clobber)); MOVAPD(tmp, R(clobber));
ANDNPD(clobber, R(xmm)); ANDNPD(clobber, R(xmm));
ANDPD(tmp, M(psGeneratedQNaN)); ANDPD(tmp, MConst(psGeneratedQNaN));
ORPD(tmp, R(clobber)); ORPD(tmp, R(clobber));
MOVAPD(xmm, R(tmp)); MOVAPD(xmm, R(tmp));
for (u32 x : inputs) for (u32 x : inputs)
@ -350,7 +350,7 @@ void Jit64::fmaddXX(UGeckoInstruction inst)
ADDSD(XMM1, fpr.R(b)); ADDSD(XMM1, fpr.R(b));
} }
if (inst.SUBOP5 == 31) // nmadd if (inst.SUBOP5 == 31) // nmadd
XORPD(XMM1, M(packed ? psSignBits2 : psSignBits)); XORPD(XMM1, MConst(packed ? psSignBits2 : psSignBits));
} }
fpr.BindToRegister(d, !single); fpr.BindToRegister(d, !single);
if (single) if (single)
@ -385,15 +385,15 @@ void Jit64::fsign(UGeckoInstruction inst)
{ {
case 40: // neg case 40: // neg
avx_op(&XEmitter::VXORPD, &XEmitter::XORPD, fpr.RX(d), src, avx_op(&XEmitter::VXORPD, &XEmitter::XORPD, fpr.RX(d), src,
M(packed ? psSignBits2 : psSignBits), packed); MConst(packed ? psSignBits2 : psSignBits), packed);
break; break;
case 136: // nabs case 136: // nabs
avx_op(&XEmitter::VORPD, &XEmitter::ORPD, fpr.RX(d), src, M(packed ? psSignBits2 : psSignBits), avx_op(&XEmitter::VORPD, &XEmitter::ORPD, fpr.RX(d), src,
packed); MConst(packed ? psSignBits2 : psSignBits), packed);
break; break;
case 264: // abs case 264: // abs
avx_op(&XEmitter::VANDPD, &XEmitter::ANDPD, fpr.RX(d), src, M(packed ? psAbsMask2 : psAbsMask), avx_op(&XEmitter::VANDPD, &XEmitter::ANDPD, fpr.RX(d), src,
packed); MConst(packed ? psAbsMask2 : psAbsMask), packed);
break; break;
default: default:
PanicAlert("fsign bleh"); PanicAlert("fsign bleh");
@ -608,7 +608,7 @@ void Jit64::fctiwx(UGeckoInstruction inst)
// The upper 32 bits of the result are set to 0xfff80000, // The upper 32 bits of the result are set to 0xfff80000,
// except for -0.0 where they are set to 0xfff80001 (TODO). // except for -0.0 where they are set to 0xfff80001 (TODO).
MOVAPD(XMM0, M(half_qnan_and_s32_max)); MOVAPD(XMM0, MConst(half_qnan_and_s32_max));
MINSD(XMM0, fpr.R(b)); MINSD(XMM0, fpr.R(b));
switch (inst.SUBOP10) switch (inst.SUBOP10)
{ {