[libunwind] [llvm] [MC][AArch64] Add .cfi_llvm_set_ra_sign_state for PAuth_LR (PR #205442)

Jack Styles via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 7 08:06:05 PDT 2026


Stylie777 wrote:

> re: https://github.com/llvm/llvm-project/issues/137802, do you know why we have this discontinuity between PAuth and PAuth_LR'd frames? Why do we emit .cfi_negate_ra_state_with_pc before the pacibsppc, when all other CFI's take effect after the preceding instruction has retired?

When I originally implemented this, it was to do with how the ABI was interpreted. It stated that `.cfi_negate_ra_state_with_pc` needed to be in the same Debug Frame, which I interpreted as before the signing instruction. This ensured the PC value used was the PC value that referred to the signing instruction. For `.cfi_negate_ra_state` having it before the signing instruction was wrong, but it was decided in https://github.com/llvm/llvm-project/pull/137795 to leave `.cfi_negate_ra_state_with_pc` as is because putting it after caused a wrong-code bug in C++ (See https://github.com/llvm/llvm-project/pull/137795#issuecomment-2838779129).

It was during these discussions that it was raised in the ABI to change how we handle it to `.cfi_set_ra_sign_state`.



https://github.com/llvm/llvm-project/pull/205442


More information about the cfe-commits mailing list