[all-commits] [llvm/llvm-project] f2e728: [AArch64][PtrAuth] Fix unwind state for tail calls
ostannard via All-commits
all-commits at lists.llvm.org
Thu Aug 3 03:46:07 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f2e7285b03fbfc263c8a2eaa2b5e2e1cfafc6abd
https://github.com/llvm/llvm-project/commit/f2e7285b03fbfc263c8a2eaa2b5e2e1cfafc6abd
Author: Oliver Stannard <oliver.stannard at arm.com>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-regsave.mir
M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-thunk.ll
M llvm/test/CodeGen/AArch64/sign-return-address-cfi-negate-ra-state.ll
M llvm/test/CodeGen/AArch64/sign-return-address.ll
Log Message:
-----------
[AArch64][PtrAuth] Fix unwind state for tail calls
When generating unwind tables for code which uses return-address
signing, we need to toggle the RA_SIGN_STATE DWARF register around any
tail-calls, because these require the return address to be authenticated
before the call, and could throw an exception. This is done using the
.cfi_negate_ra_state directive before the call, and .cfi_restore_state
at the start of the next basic block.
However, since D153098, the .cfi_restore_state isn't being inserted,
because the CFIFixup pass isn't being run. This re-enables that pass
when return-adress signing is enabled.
Reviewed By: ikudrin, MaskRay
Differential Revision: https://reviews.llvm.org/D156428
More information about the All-commits
mailing list