mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-18 00:09:11 +00:00
JitArm64_Integer: subfex - Improve codegen for zero with InHostCarry
Another instance where we needlessly materialized constant zero in a register. We can just write the carry flag directly. Before: 0x5280001a mov w26, #0x0 ; =0 0x1a1f035a adc w26, w26, wzr After: 0x1a9f37fa cset w26, hs
This commit is contained in:
parent
4d0cf1315e
commit
854979937c
1 changed files with 6 additions and 1 deletions
|
@ -1339,7 +1339,12 @@ void JitArm64::subfex(UGeckoInstruction inst)
|
|||
{
|
||||
gpr.BindToRegister(d, false);
|
||||
ARM64Reg RD = gpr.R(d);
|
||||
if (is_all_ones)
|
||||
if (is_zero)
|
||||
{
|
||||
// RD = 0 + carry
|
||||
CSET(RD, CC_CS);
|
||||
}
|
||||
else if (is_all_ones)
|
||||
{
|
||||
// RD = -1 + carry = carry ? 0 : -1
|
||||
// CSETM sets the destination to -1 if the condition is true, 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue