mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-17 10:00:36 +02:00
The current separated adr and adrp handlers are difficult to use if you don't know if the resulting address is going to be within 1MB or 4GB. Adds a `LongAddressGen` helper that will generate the various pieces of code that will need to be emitted. Backward labels: - Can generate three different code segments depending on distance to label - adr if label is within 1MB - adrp if label is 4K page aligned and within 4GB - adrp+add if label is within 4GB Forward labels: - Can generate three different code segments depending on distance to label - nop+adr if label is within 1MB - nop+adrp if label is 4K page aligned and within 4GB - adrp+add if label is within 4GB There is still the limitation that this can't generate addresses to labels that are >4GB away. Which is fine.