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)
|
if (inst.Rc)
|
||||||
ComputeRC0(gpr.GetImm(d));
|
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
|
else
|
||||||
{
|
{
|
||||||
gpr.BindToRegister(d, d == a || d == b);
|
gpr.BindToRegister(d, d == a || d == b);
|
||||||
|
|||||||
Reference in New Issue
Block a user