[compiler-rt] [flang] [llvm] [AArch64] fix trampoline implementation: use X15 (PR #126743)

Jameson Nash via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 14:23:49 PDT 2025


================
@@ -523,6 +537,7 @@ def CC_AArch64_Preserve_None : CallingConv<[
   // We can pass arguments in all general registers, except:
   // - X8, used for sret
   // - X16/X17, used by the linker as IP0/IP1
+  // - X15, the nest register and used by Windows for stack allocation
----------------
vtjnash wrote:

Agreed, I'd have preferred to make X15 reserved for this on all platforms (instead of just on Windows), but I guess that could be ABI-breaking and slightly less efficient. In any case, the backend is still expected to cause errors here, unchanged from before this PR, since the nest register is left undefined in the calling convention tablegen file.

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


More information about the llvm-commits mailing list