[llvm] [win][aarch64] The Windows Control Flow Guard Check function also preserves X15 (PR #179738)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 9 12:00:37 PST 2026


================
@@ -617,10 +617,12 @@ def CSR_Win_AArch64_RT_AllRegs
     : CalleeSavedRegs<(add CSR_Win_AArch64_RT_MostRegs, (sequence "Q%u", 8, 31))>;
 
 // The Control Flow Guard check call uses a custom calling convention that also
-// preserves X0-X8 and Q0-Q7.
+// preserves X0-X8 and Q0-Q7. X15 is the target function being checked, which is
+// also preserved.
 def CSR_Win_AArch64_CFGuard_Check : CalleeSavedRegs<(add CSR_Win_AArch64_AAPCS,
                                                (sequence "X%u", 0, 8),
-                                               (sequence "Q%u", 0, 7))>;
+                                               (sequence "Q%u", 0, 7),
+                                               X15)>;
----------------
efriedma-quic wrote:

Please update the comment, then.

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


More information about the llvm-commits mailing list