JitArm64_Integer: subfcx - Subtract shifted 12-bit constant
Eliminate an instruction by encoding the constant in the subtraction, part two. Before: 0x52900019 mov w25, #0x8000 ; =32768 0x6b190359 subs w25, w26, w25 After: 0x71402359 subs w25, w26, #0x8, lsl #12 ; =0x8000
This commit is contained in:
@@ -1451,6 +1451,14 @@ void JitArm64::subfcx(UGeckoInstruction inst)
|
|||||||
if (inst.Rc)
|
if (inst.Rc)
|
||||||
ComputeRC0(gpr.R(d));
|
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))
|
else if (gpr.IsImm(b, 0))
|
||||||
{
|
{
|
||||||
gpr.BindToRegister(d, d == a);
|
gpr.BindToRegister(d, d == a);
|
||||||
|
|||||||
Reference in New Issue
Block a user