[libunwind] [libunwind] Call `__arm_za_disable` before entering EH (PR #160905)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 30 03:09:57 PDT 2025


================
@@ -1971,6 +1975,32 @@ Registers_arm64::operator=(const Registers_arm64 &other) {
   return *this;
 }
 
+void Registers_arm64::jumpto() {
+#if !defined(__APPLE__)
+  // The platform must ensure that all the following conditions are true on
+  // entry to EH:
+  //
+  // - PSTATE.SM is 0.
+  // - PSTATE.ZA is 0.
+  // - TPIDR2_EL0 is null.
+  //
+  // The first point is ensured by routines for throwing exceptions having a
+  // non-streaming interface. TPIDR2_EL0 is set to null and ZA disabled by
+  // calling __arm_za_disable.
+  //
+  // See:
+  // https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#exceptions
----------------
ojhunt wrote:

I believe we should link to something more stable like their tag versions, say https://github.com/ARM-software/abi-aa/blob/2025Q1/aapcs64/aapcs64.rst#exceptions

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


More information about the cfe-commits mailing list