Sintendo 4a29e0e4f4 JitArm64_Integer: cmp - Subtract 12-bit constant
You can encode a 12-bit immediate in a SUB instruction on ARM64.
Constants in this range do not need to be sign extended, so we can
exploit this to avoid materializing the immediate.

This approach saves an instruction if it does not need to be
materialized in a register afterwards. Otherwise, we just materialize
it later and the total number of instructions stays the same.

Before:
0x52800416   mov    w22, #0x20                ; =32
0x93407f78   sxtw   x24, w27
0xcb36c318   sub    x24, x24, w22, sxtw

After:
0x93407f78   sxtw   x24, w27
0xd1008318   sub    x24, x24, #0x20
2025-02-02 12:00:12 +01:00
..
2025-01-19 10:30:41 +01:00
2025-01-19 10:30:41 +01:00
2024-08-20 14:59:54 +02:00