[libunwind] [LFI][libunwind] Avoid writing to reserved registers on the `aarch64_lfi` target (PR #192739)
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 20 09:55:00 PDT 2026
================
@@ -794,9 +794,14 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
stp x18,x19, [x0, #0x090]
stp x20,x21, [x0, #0x0A0]
stp x22,x23, [x0, #0x0B0]
+#if defined(__LFI__)
+ stp x24,xzr, [x0, #0x0C0]
+ stp xzr,x29, [x0, #0x0E0]
----------------
nickdesaulniers wrote:
```suggestion
str x24, [x0, #0x0C0]
// Skip spilling x25-x28; reserved by LFI ABI.
str x29, [x0, #0x0E8]
```
https://github.com/llvm/llvm-project/pull/192739
More information about the cfe-commits
mailing list