mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
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)
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user