[libunwind][AArch64] Add support for DWARF expression for RA_SIGN_STATE.
authorDaniel Kiss <daniel.kiss@arm.com>
Fri, 13 May 2022 07:12:07 +0000 (09:12 +0200)
committerDaniel Kiss <daniel.kiss@arm.com>
Fri, 13 May 2022 08:05:59 +0000 (10:05 +0200)
commitf6366ef7f4f3cf1182fd70e0c50a9fa54374b612
tree9f64274ab073b29d58db5b4b1f1151925ecc4a3f
parent094fb13b88b36ecfa475cb877d2c6e9d90b4d1a5
[libunwind][AArch64] Add support for DWARF expression for RA_SIGN_STATE.

Program may set the RA_SIGN_STATE pseudo register by expressions.
Libunwind expected only the DW_CFA_AARCH64_negate_ra_state could change the value
of the register which leads to runtime errors on PAC enabled systems.
In the recent version of the aadwarf64[1] a limitation is added[2] to forbid the mixing the
DW_CFA_AARCH64_negate_ra_state with other DWARF Register Rule Instructions.

[1] https://github.com/ARM-software/abi-aa/releases/tag/2022Q1
[2] https://github.com/ARM-software/abi-aa/pull/129

Reviewed By: #libunwind, MaskRay

Differential Revision: https://reviews.llvm.org/D123692
libunwind/src/DwarfInstructions.hpp
libunwind/test/aarch64.ra_sign_state.pass.cpp [new file with mode: 0644]