summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/GCAdapter.cpp
diff options
context:
space:
mode:
authorSintendo <3380580+Sintendo@users.noreply.github.com>2025-01-06 12:09:09 +0100
committerSintendo <3380580+Sintendo@users.noreply.github.com>2025-01-06 12:09:12 +0100
commit24f2981e54b4da75f8a1996610bb0a71d1585941 (patch)
treee1d22158b129389b2b9a036f89140235e3e901e3 /Source/Core/InputCommon/GCAdapter.cpp
parentb35f7af355dad22b1b2d408c5d17d781e506686f (diff)
JitArm64_SystemRegisters: Small FixGTBeforeSettingCRFieldBit optimization
The computed value is only used when the register is equal to zero, so we can fully precompute it and materialize the constant instead. In other words, we change from ``` return reg == 0 ? (reg | 1ULL << 63) : reg; ``` to ``` return reg == 0 ? 1ULL << 63 : reg; ``` The number of instructions remains the same, but we eliminate an unnecessary dependency on the register value. Before: 0xb241037a orr x26, x27, #0x8000000000000000 0xeb1f037f cmp x27, xzr 0x9a9a137b csel x27, x27, x26, ne After: 0xd2f0001a mov x26, #-0x8000000000000000 ; =-9223372036854775808 0xeb1f037f cmp x27, xzr 0x9a9a137b csel x27, x27, x26, ne
Diffstat (limited to 'Source/Core/InputCommon/GCAdapter.cpp')
0 files changed, 0 insertions, 0 deletions