cpython icon indicating copy to clipboard operation
cpython copied to clipboard

JIT: `patch_aarch64_33rx` relaxation does not optimize offsets > 1MB

Open markshannon opened this issue 1 month ago • 0 comments

The patch_aarch64_33rx relaxation only improves offsets <1MB.

If the offset is >1MB we can't save any instructions, but we can save the load from the data section.

Instead of:

adrp address of data holding value (hi bits)
ldr address of data holding value (lo bits)

we can get the value directly, as long as it is within 4GB

adrp value (hi bits)
add value (lo bits)

Linked PRs

  • gh-142820

markshannon avatar Dec 12 '25 10:12 markshannon