mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
JitArm64_Integer: subfcx - Optimize a == 0
This case can be handled as a move. It also generates a constant carry flag. Before: 0x52800013 mov w19, #0x0 ; =0 0x6b1302b3 subs w19, w21, w19 After: 0x2a1503f3 mov w19, w21
This commit is contained in:
@@ -1432,6 +1432,17 @@ void JitArm64::subfcx(UGeckoInstruction inst)
|
||||
if (inst.Rc)
|
||||
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
|
||||
{
|
||||
gpr.BindToRegister(d, d == a || d == b);
|
||||
|
||||
Reference in New Issue
Block a user