mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-08 09:40:29 +00:00
JitArm64: simplify fcmpX
This commit is contained in:
parent
94f0e2493c
commit
659b42b614
@ -355,27 +355,12 @@ void JitArm64::fcmpX(UGeckoInstruction inst)
|
|||||||
ARM64Reg WA = gpr.GetReg();
|
ARM64Reg WA = gpr.GetReg();
|
||||||
ARM64Reg XA = EncodeRegTo64(WA);
|
ARM64Reg XA = EncodeRegTo64(WA);
|
||||||
|
|
||||||
FixupBranch pNaN1, pNaN2, pNaN3, pLesser, pGreater;
|
FixupBranch pNaN, pLesser, pGreater;
|
||||||
FixupBranch continue1, continue2, continue3;
|
FixupBranch continue1, continue2, continue3;
|
||||||
ORR(XA, ZR, 32, 0, true);
|
ORR(XA, ZR, 32, 0, true);
|
||||||
|
|
||||||
if (a != b)
|
|
||||||
{
|
|
||||||
m_float_emit.FCMP(EncodeRegToDouble(VA), EncodeRegToDouble(VA));
|
|
||||||
|
|
||||||
// if (B != B) or (A != A), goto NaN's jump target
|
|
||||||
pNaN1 = B(CC_NEQ);
|
|
||||||
|
|
||||||
m_float_emit.FCMP(EncodeRegToDouble(VB), EncodeRegToDouble(VB));
|
|
||||||
|
|
||||||
pNaN2 = B(CC_NEQ);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_float_emit.FCMP(EncodeRegToDouble(VA), EncodeRegToDouble(VB));
|
m_float_emit.FCMP(EncodeRegToDouble(VA), EncodeRegToDouble(VB));
|
||||||
|
|
||||||
if (a == b)
|
|
||||||
pNaN3 = B(CC_NEQ);
|
|
||||||
|
|
||||||
if (a != b)
|
if (a != b)
|
||||||
{
|
{
|
||||||
// if B > A goto Greater's jump target
|
// if B > A goto Greater's jump target
|
||||||
@ -384,18 +369,13 @@ void JitArm64::fcmpX(UGeckoInstruction inst)
|
|||||||
pLesser = B(CC_MI);
|
pLesser = B(CC_MI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pNaN = B(CC_VS);
|
||||||
|
|
||||||
|
// A == B
|
||||||
ORR(XA, XA, 64 - 63, 0, true);
|
ORR(XA, XA, 64 - 63, 0, true);
|
||||||
continue1 = B();
|
continue1 = B();
|
||||||
|
|
||||||
if (a != b)
|
SetJumpTarget(pNaN);
|
||||||
{
|
|
||||||
SetJumpTarget(pNaN1);
|
|
||||||
SetJumpTarget(pNaN2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetJumpTarget(pNaN3);
|
|
||||||
}
|
|
||||||
|
|
||||||
ORR(XA, XA, 64 - 61, 0, true);
|
ORR(XA, XA, 64 - 61, 0, true);
|
||||||
ORR(XA, XA, 0, 0, true);
|
ORR(XA, XA, 0, 0, true);
|
||||||
@ -412,14 +392,11 @@ void JitArm64::fcmpX(UGeckoInstruction inst)
|
|||||||
SetJumpTarget(pLesser);
|
SetJumpTarget(pLesser);
|
||||||
ORR(XA, XA, 64 - 62, 1, true);
|
ORR(XA, XA, 64 - 62, 1, true);
|
||||||
ORR(XA, XA, 0, 0, true);
|
ORR(XA, XA, 0, 0, true);
|
||||||
}
|
|
||||||
|
|
||||||
SetJumpTarget(continue1);
|
|
||||||
if (a != b)
|
|
||||||
{
|
|
||||||
SetJumpTarget(continue2);
|
SetJumpTarget(continue2);
|
||||||
SetJumpTarget(continue3);
|
SetJumpTarget(continue3);
|
||||||
}
|
}
|
||||||
|
SetJumpTarget(continue1);
|
||||||
|
|
||||||
STR(INDEX_UNSIGNED, XA, X29, PPCSTATE_OFF(cr_val[0]) + (sizeof(PowerPC::ppcState.cr_val[0]) * crf));
|
STR(INDEX_UNSIGNED, XA, X29, PPCSTATE_OFF(cr_val[0]) + (sizeof(PowerPC::ppcState.cr_val[0]) * crf));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user