mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 14:49:22 +00:00
JitArm64_Integer: addex - Optimize InHostCarry for -1
Same thing we did for subfex. Before: 0x1280001a mov w26, #-0x1 ; =-1 0x1a1f035a adc w26, w26, wzr After: 0x5a9f23fa csetm w26, lo
This commit is contained in:
parent
4bc03c635e
commit
c54bd258f9
1 changed files with 7 additions and 0 deletions
|
@ -1500,6 +1500,13 @@ void JitArm64::addex(UGeckoInstruction inst)
|
||||||
// RD = 0 + carry = carry ? 1 : 0
|
// RD = 0 + carry = carry ? 1 : 0
|
||||||
CSET(RD, CC_CS);
|
CSET(RD, CC_CS);
|
||||||
}
|
}
|
||||||
|
else if (is_all_ones)
|
||||||
|
{
|
||||||
|
// RD = -1 + carry = carry ? 0 : -1
|
||||||
|
// Note that CSETM sets the destination to -1 if the condition is true,
|
||||||
|
// and 0 otherwise. Hence, the condition must be carry clear.
|
||||||
|
CSETM(RD, CC_CC);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MOVI2R(RD, imm);
|
MOVI2R(RD, imm);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue