-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix sret for AArch64 #4634
Fix sret for AArch64 #4634
Conversation
I did some investigation into this, and i think this is being broken by the If I understand this correctly it inserts a second return arg, which is causing some trouble in the regalloc (still don't fully understand why though). However, by adding that return arg I think it is breaking the AArch64 ABI anyway, so we should probably restrict that to x86. (probably by moving it to the x86 backend as suggested in #4618 (comment)). |
I think I found the problem.
|
AArch64 requires the struct return address argument to be stored in the x8 register. This register is never used for regular arguments.
Apart from i128, all abi-checker tests now pass with this PR. |
AArch64 requires the struct return address argument to be stored in the x8 register. This register is never used for regular arguments.
According to https://github.com/Gankra/abi-checker cg_clif with this PR matches the abi of LLVM for big structs.
Marking as draft as the test fails with: