]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgcc: aarch64: Add SME unwinder support
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 29 Sep 2023 12:55:51 +0000 (13:55 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 8 Dec 2023 11:29:07 +0000 (11:29 +0000)
commit91d68665b8b7a5dffd0bbf8cd1f74c3c41d4c2d8
tree420dc75939eb249099be25914f874a9afb1aa63c
parent328c17af772207cb03740809c05ba2c3abfb86be
libgcc: aarch64: Add SME unwinder support

To support the ZA lazy save scheme, the PCS requires the unwinder to
reset the SME state to PSTATE.SM=0, PSTATE.ZA=0, TPIDR2_EL0=0 on entry
to an exception handler. We use the __arm_za_disable SME runtime call
unconditionally to achieve this.
https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#exceptions

The hidden alias is used to avoid a PLT and avoid inconsistent VPCS
marking (we don't rely on special PCS at the call site). In case of
static linking the SME runtime init code is linked in code that raises
exceptions.

libgcc/ChangeLog:

* config/aarch64/__arm_za_disable.S: Add hidden alias.
* config/aarch64/aarch64-unwind.h: Reset the SME state before
EH return via the _Unwind_Frames_Extra hook.
libgcc/config/aarch64/__arm_za_disable.S
libgcc/config/aarch64/aarch64-unwind.h