mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-10 18:20:58 +02: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user