Skip to content

Commit cc372b4

Browse files
committed
[libunwind] Ensure zaDisable() is called in jumpto/returnto (NFC)
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.
1 parent 3c52f53 commit cc372b4

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

libunwind/src/Registers.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,16 +1862,13 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
18621862
v128 getVectorRegister(int num) const;
18631863
void setVectorRegister(int num, v128 value);
18641864
static const char *getRegisterName(int num);
1865+
void jumpto(unsigned walkedFrames = 0) {
1866+
zaDisable();
1867+
__libunwind_Registers_arm64_jumpto(this, walkedFrames);
1868+
}
18651869
#ifdef _LIBUNWIND_TRACE_RET_INJECT
18661870
_LIBUNWIND_TRACE_NO_INLINE
1867-
void returnto(unsigned walkedFrames) {
1868-
__libunwind_Registers_arm64_jumpto(this, walkedFrames);
1869-
}
1870-
#else
1871-
void jumpto() {
1872-
zaDisable();
1873-
__libunwind_Registers_arm64_jumpto(this, 0);
1874-
}
1871+
void returnto(unsigned walkedFrames) { jumpto(walkedFrames); }
18751872
#endif
18761873
static constexpr int lastDwarfRegNum() {
18771874
return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64;

0 commit comments

Comments
 (0)