Skip to content

Use special ARM64 register names in disassembly #6512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
e2r3p13 opened this issue Mar 22, 2025 · 2 comments · May be fixed by #6757
Open

Use special ARM64 register names in disassembly #6512

e2r3p13 opened this issue Mar 22, 2025 · 2 comments · May be fixed by #6757
Labels
Arch: ARM64 Issues with the AArch64 architecture plugin Component: Architecture Issue needs changes to an architecture plugin Effort: Low Issue should take < 1 week Impact: Low Issue is a papercut or has a good, supported workaround

Comments

@e2r3p13
Copy link

e2r3p13 commented Mar 22, 2025

The ARM64 architecture reserves x29 and x30 for special purposes: the frame pointer fp and the link register lr, respectively.

I think using these special names in the disassembly view would improve the experience.

For instance, here is the current disassembly of a classic function prologue:

sub     sp, sp, #0x30
stp     x29, x30, [sp, #0x20] {__saved_x29} {__saved_x30}
add     x29, sp, #0x20 {__saved_x29}

And here is what it would look like using special register names:

sub     sp, sp, #0x30
stp     fp, lr, [sp, #0x20] {__saved_fp} {__saved_lr}
add     fp, sp, #0x20 {__saved_fp}
@xusheng6 xusheng6 added Component: Architecture Issue needs changes to an architecture plugin Arch: ARM64 Issues with the AArch64 architecture plugin Impact: Low Issue is a papercut or has a good, supported workaround Effort: Low Issue should take < 1 week labels Mar 25, 2025
@xusheng6
Copy link
Member

I think this would be nice -- also it can make the debugger work better since LLDB uses the names fp and lr.

We may offer this as a configurable option as well

@yrp604 yrp604 linked a pull request May 2, 2025 that will close this issue
@yrp604
Copy link
Contributor

yrp604 commented May 2, 2025

Probably should be split off into its own issue, but rewriting x8 into xr in the cases where it's used as an out param would be cool. This would be a more involved change and would require out params to be supported in the cc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: ARM64 Issues with the AArch64 architecture plugin Component: Architecture Issue needs changes to an architecture plugin Effort: Low Issue should take < 1 week Impact: Low Issue is a papercut or has a good, supported workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants