[llvm] langref updates for aarch64 trampoline (PR #139740)

Jameson Nash via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 14:52:55 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:

I'd also consider it a bug and a crash if LLVM prints any error messages (llvm_unreachable is supposed to be, um, unreachable in code that passes the verifier, but it is used for trampoline in backends such as X86ISelLowering with the message "Unsupported calling convention"). I guess it is instead currently just an undocumented behavior that calling conventions are allowed to print errors if the backend doesn't support it?

https://github.com/llvm/llvm-project/pull/139740


More information about the llvm-commits mailing list