[llvm] langref updates for aarch64 trampoline (PR #139740)
Jameson Nash via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 10:07:59 PDT 2025
================
@@ -410,8 +410,9 @@ added in the future:
calling convention: on most platforms, they are not preserved and need to
be saved by the caller, but on Windows, xmm6-xmm15 are preserved.
- - On AArch64 the callee preserve all general purpose registers, except X0-X8
- and X16-X18.
+ - On AArch64 the callee preserve all general purpose registers, except
+ X0-X8 and X16-X18. Using this calling convention with nest is forbidden
+ and may crash llvm.
----------------
vtjnash wrote:
Okay, I see `LLVMContext->emitError` now (which defaults to calling `exit(1)`, but which can be customized). I guess that existence could potentially be better communicated to frontends? I find it curious that the entire section on how to handle errors in llvm makes no reference of this: https://llvm.org/docs/ProgrammersManual.html#recoverable-errors. And a recently discourse thread on how to handle errors in the backend also claimed it wasn't possible because the proper way to handle it without crashing doesn't exist: https://discourse.llvm.org/t/rfc-report-fatal-error-and-the-default-value-of-gencrashdialog/73587
Would you be willing to review and merge a PR to that section of the manual if I were to add a mention there?
(and perhaps we should also delete the `exit(1)` in diagnose, instead providing that behavior as an option, so that backends need to properly test that function not returning, and that front end tools are forced to actually implement it better using whatever error recovery–or exit(1) call–that they have)
https://github.com/llvm/llvm-project/pull/139740
More information about the llvm-commits
mailing list