JitArm64: subfic - Conditionally skip temp reg allocation
This commit is contained in:
parent
2c91367429
commit
5d647251f7
|
@ -1392,12 +1392,16 @@ void JitArm64::subfic(UGeckoInstruction inst)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gpr.BindToRegister(d, d == a);
|
const bool allocate_reg = d == a;
|
||||||
|
gpr.BindToRegister(d, allocate_reg);
|
||||||
|
|
||||||
// d = imm - a
|
// d = imm - a
|
||||||
ARM64Reg WA = gpr.GetReg();
|
ARM64Reg RD = gpr.R(d);
|
||||||
|
ARM64Reg WA = allocate_reg ? gpr.GetReg() : RD;
|
||||||
MOVI2R(WA, imm);
|
MOVI2R(WA, imm);
|
||||||
CARRY_IF_NEEDED(SUB, SUBS, gpr.R(d), WA, gpr.R(a));
|
CARRY_IF_NEEDED(SUB, SUBS, RD, WA, gpr.R(a));
|
||||||
|
|
||||||
|
if (allocate_reg)
|
||||||
gpr.Unlock(WA);
|
gpr.Unlock(WA);
|
||||||
|
|
||||||
ComputeCarry();
|
ComputeCarry();
|
||||||
|
|
Loading…
Reference in New Issue