elliottt opened PR #8389 from elliottt:trevor/aarch64-tail-callee-saves to bytecodealliance:main:
Switch back to mostly following the AArch64 ABI for callee-save registers with the tail calling convention, except that we still reserve x0 and x1 to resolve issues with indirect tail calls.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt updated PR #8389.
elliottt has marked PR #8389 as ready for review.
elliottt requested abrown for a review on PR #8389.
elliottt requested wasmtime-compiler-reviewers for a review on PR #8389.
elliottt requested fitzgen for a review on PR #8389.
elliottt requested alexcrichton for a review on PR #8389.
elliottt requested jameysharp for a review on PR #8389.
elliottt edited PR #8389:
Switch back to mostly following the AArch64 ABI for callee-save registers with the tail calling convention, except that we still reserve x0 for the return area pointer and x1 for the destination of an indirect tail call.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen submitted PR review:
Very nice! \o/
fitzgen submitted PR review:
Very nice! \o/
fitzgen created PR review comment:
Potential follow up issue: it seems like we should use the store-pair instructions for restoring callee-save registers in the future, when possible.
fitzgen edited PR review comment.
elliottt submitted PR review.
elliottt created PR review comment:
Yeah, that's a great point!
elliottt submitted PR review.
elliottt created PR review comment:
Though in this case I think these are incoming args area stores for the tail call, but it would still be great to have the infrastructure available to merge those into a single instruction.
elliottt merged PR #8389.
Last updated: Jan 10 2026 at 02:36 UTC