Skip to content

Display the absolute address for relative branches for ARM32 and ARM64#746

Open
canova wants to merge 2 commits intomstange:mainfrom
canova:asm-absolute-branches
Open

Display the absolute address for relative branches for ARM32 and ARM64#746
canova wants to merge 2 commits intomstange:mainfrom
canova:asm-absolute-branches

Conversation

@canova
Copy link
Contributor

@canova canova commented Feb 3, 2026

This PR changes the ARM32 and ARM64 decoding to display the absolute addresses instead of relative ones.

It also adds a fixture for ARM64 and adds an asm endpoint test with it. Apparently we have tests for both ARM32 and x86_64 but we didn't have one for ARM64.

This will allow us to see the changes in the following commit.
Both of them had some quirks that we had to overcome differently.

On ARM64, some opcodes can take multiple operands, and the pc offset
operand could be in different positions.

On ARM32, branch offsets are shifted by either 1 or 2. But the immediate
value that is stored inside the yaxpeax_arm Operand enum is a
non-shifted value. So we have to shift them ourselves.
@canova canova force-pushed the asm-absolute-branches branch from 70495c9 to f281ecb Compare February 3, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant