mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Merge pull request #13852 from Sintendo/jitarm64-subfcx
JitArm64_Integer: subfcx optimizations
This commit is contained in:
commit
770c74cc95
@ -1445,6 +1445,41 @@ void JitArm64::subfcx(UGeckoInstruction inst)
|
|||||||
if (inst.Rc)
|
if (inst.Rc)
|
||||||
ComputeRC0(gpr.GetImm(d));
|
ComputeRC0(gpr.GetImm(d));
|
||||||
}
|
}
|
||||||
|
else if (gpr.IsImm(a, 0))
|
||||||
|
{
|
||||||
|
if (d != b)
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(d, false);
|
||||||
|
MOV(gpr.R(d), gpr.R(b));
|
||||||
|
}
|
||||||
|
ComputeCarry(true);
|
||||||
|
if (inst.Rc)
|
||||||
|
ComputeRC0(gpr.R(d));
|
||||||
|
}
|
||||||
|
else if (gpr.IsImm(a) && ((gpr.GetImm(a) & 0xFFF) == gpr.GetImm(a)))
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(d, d == b);
|
||||||
|
CARRY_IF_NEEDED(SUB, SUBS, gpr.R(d), gpr.R(b), gpr.GetImm(a));
|
||||||
|
ComputeCarry();
|
||||||
|
if (inst.Rc)
|
||||||
|
ComputeRC0(gpr.R(d));
|
||||||
|
}
|
||||||
|
else if (gpr.IsImm(a) && ((gpr.GetImm(a) & 0xFFF000) == gpr.GetImm(a)))
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(d, d == b);
|
||||||
|
CARRY_IF_NEEDED(SUB, SUBS, gpr.R(d), gpr.R(b), gpr.GetImm(a) >> 12, true);
|
||||||
|
ComputeCarry();
|
||||||
|
if (inst.Rc)
|
||||||
|
ComputeRC0(gpr.R(d));
|
||||||
|
}
|
||||||
|
else if (gpr.IsImm(b, 0))
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(d, d == a);
|
||||||
|
CARRY_IF_NEEDED(NEG, NEGS, gpr.R(d), gpr.R(a));
|
||||||
|
ComputeCarry();
|
||||||
|
if (inst.Rc)
|
||||||
|
ComputeRC0(gpr.R(d));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gpr.BindToRegister(d, d == a || d == b);
|
gpr.BindToRegister(d, d == a || d == b);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user