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