mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-08 15:20:45 +01:00
JitArm64_Integer: addex - Optimize InHostCarry for 0
Similar to what we did for subfex, but for 0. Before: 0x5280001b mov w27, #0x0 ; =0 0x1a1f037b adc w27, w27, wzr After: 0x1a9f37fb cset w27, hs
This commit is contained in:
parent
ad7dba5413
commit
d2bfa157dc
@ -1495,8 +1495,16 @@ void JitArm64::addex(UGeckoInstruction inst)
|
||||
{
|
||||
gpr.BindToRegister(d, false);
|
||||
ARM64Reg RD = gpr.R(d);
|
||||
if (is_zero)
|
||||
{
|
||||
// RD = 0 + carry = carry ? 1 : 0
|
||||
CSET(RD, CC_CS);
|
||||
}
|
||||
else
|
||||
{
|
||||
MOVI2R(RD, imm);
|
||||
ADC(RD, RD, ARM64Reg::WZR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CarryFlag::ConstantTrue:
|
||||
|
Loading…
Reference in New Issue
Block a user