mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-07-12 23:01:23 -05:00
JitArm64_Integer: subfcx - Optimize b == 0
Equivalent to a negation, no need to materialize the zero. Before: 0x52800015 mov w21, #0x0 ; =0 0x6b1802b6 subs w22, w21, w24 After: 0x6b1803f6 negs w22, w24
This commit is contained in:
parent
e3d889feb1
commit
fc9f2d9cea
|
|
@ -1443,6 +1443,14 @@ void JitArm64::subfcx(UGeckoInstruction inst)
|
|||
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
|
||||
{
|
||||
gpr.BindToRegister(d, d == a || d == b);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user