Merge pull request #13224 from Sintendo/jitarm64-subfic2
JitArm64_Integer: Optimize subfic for -1
This commit is contained in:
commit
ac0d6cbaaa
|
@ -1394,11 +1394,21 @@ void JitArm64::subfic(UGeckoInstruction inst)
|
|||
else
|
||||
{
|
||||
const bool will_read = d == a;
|
||||
const bool is_zero = imm == 0;
|
||||
gpr.BindToRegister(d, will_read);
|
||||
ARM64Reg RD = gpr.R(d);
|
||||
|
||||
if (imm == -1)
|
||||
{
|
||||
// d = -1 - a = ~a
|
||||
MVN(RD, gpr.R(a));
|
||||
// CA is always set in this case
|
||||
ComputeCarry(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool is_zero = imm == 0;
|
||||
|
||||
// d = imm - a
|
||||
ARM64Reg RD = gpr.R(d);
|
||||
{
|
||||
Arm64GPRCache::ScopedARM64Reg WA(ARM64Reg::WZR);
|
||||
if (!is_zero)
|
||||
|
@ -1413,6 +1423,7 @@ void JitArm64::subfic(UGeckoInstruction inst)
|
|||
ComputeCarry();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JitArm64::addex(UGeckoInstruction inst)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue