3 Commits

Author SHA1 Message Date
Jon Roelofs
47e4282c19
[libunwind][Apple] Improve test coverage on Apple platforms (#186423)
Introduces a macro abstraction around capturing the bounds of a
function, which many platforms handle subtly differently (Mach-O, and
ELF, for example).

Also introduce an arm64[^-]* -> aarch64 available feature, to enable
more tests that would otherwise be excluded on Apple platforms, whose
target triples tend to take the form e.g. 'arm64-apple-macosx', rather
than 'aarch64-apple-macosx'.

Third, we implement the has-sme check using the appropriate sysctl, as
getauxval is not available on Darwin platforms.
2026-03-25 18:16:19 -07:00
Gleb Popov
33bcde0678
libunwind: Remove OS requirements from tests to make them run on more OSes (#167642)
There might be a cleaner way to enable these tests running on FreeBSD,
I'm open to suggestions.

Co-authored-by: Alexander Richardson <mail@alexrichardson.me>
2025-12-01 12:05:37 -08:00
Benjamin Maxwell
5cb2c6806e
[libunwind][AArch64] Disable ZA before resuming from unwinding (on Linux) (#165451)
This patch reimplements the SME ABI `__arm_za_disable` routine within
libunwind. This routine must be called before resuming from unwinding on
AArch64 platforms with SME support.

Before calling the routine, we need to check that SME is available. In
this patch, this is implemented for Linux-based platforms by checking
HWCAP2. It should be possible to implement this check for other
platforms as required.

This patch includes a test for this functionality. This test requires
SME, so on platforms without it, it will simply pass.
2025-11-11 09:46:13 +00:00