Skip to content
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

wazevo(arm64): do not use x18 reserved by apple #1642

Merged
merged 1 commit into from
Aug 21, 2023
Merged

Conversation

mathetake
Copy link
Member

The wazevo tests have started failing somehow only from Go 1.21 on GOOS=dawrin,
and it turns out we used the reserved "do not use" register, x18 by Apple:
https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Respect-the-purpose-of-specific-CPU-registers

Since AArch64 has lots of GP regs, we conservatively stop using x18 for all platforms (incl. linux),
but that can be relaxed later.

#1496

@mathetake mathetake merged commit 78c29fe into main Aug 21, 2023
50 of 52 checks passed
@mathetake mathetake deleted the wazevoreservex18 branch August 21, 2023 00:42
@evacchi
Copy link
Contributor

evacchi commented Aug 21, 2023

interesting apparently this is aarch64's own spec. Windows is also reserving x18 and apparently also Android? it looks like only desktop Linux allows it (or does it?)

@mathetake
Copy link
Member Author

Cool. Luckily we are not using it in the current compiler as well, so we are secured 😄

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.

2 participants