Skip to content

Conversation

@MacDue
Copy link
Member

@MacDue MacDue commented Nov 12, 2025

This is an NFC for now, as the SME checks for macOS platforms are not implemented, so zaDisable() is a no-op, but both paths for resuming from an exception should disable ZA.

This is a fixup for a recent change in #165066.

This is an NFC for now, as the SME checks for macOS platforms are not
implemented, so zaDisable() is a no-op, but both paths for resuming from
an exception should disable ZA.

This is a fixup for a recent change in llvm#165066.
@MacDue MacDue requested a review from a team as a code owner November 12, 2025 11:22
@llvmbot
Copy link
Member

llvmbot commented Nov 12, 2025

@llvm/pr-subscribers-libunwind

Author: Benjamin Maxwell (MacDue)

Changes

This is an NFC for now, as the SME checks for macOS platforms are not implemented, so zaDisable() is a no-op, but both paths for resuming from an exception should disable ZA.

This is a fixup for a recent change in #165066.


Full diff: https://github.com/llvm/llvm-project/pull/167674.diff

1 Files Affected:

  • (modified) libunwind/src/Registers.hpp (+5-8)
diff --git a/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp
index 28649fafb23d5..45a2b0921ea3b 100644
--- a/libunwind/src/Registers.hpp
+++ b/libunwind/src/Registers.hpp
@@ -1862,16 +1862,13 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
   v128        getVectorRegister(int num) const;
   void        setVectorRegister(int num, v128 value);
   static const char *getRegisterName(int num);
+  void        jumpto(unsigned walkedFrames = 0) {
+    zaDisable();
+    __libunwind_Registers_arm64_jumpto(this, walkedFrames);
+  }
 #ifdef _LIBUNWIND_TRACE_RET_INJECT
   _LIBUNWIND_TRACE_NO_INLINE
-    void      returnto(unsigned walkedFrames) {
-      __libunwind_Registers_arm64_jumpto(this, walkedFrames);
-    }
-#else
-  void        jumpto() {
-      zaDisable();
-      __libunwind_Registers_arm64_jumpto(this, 0);
-  }
+  void        returnto(unsigned walkedFrames) { jumpto(walkedFrames); }
 #endif
   static constexpr int lastDwarfRegNum() {
     return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64;

@github-actions

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants