[PATCH] D112427: [ARM] Implement setjmp BTI placement for PACBTI-M
Ties Stuij via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 25 03:30:08 PDT 2021
stuij created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
stuij requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch intends to guard indirect branches performed by longjmp
by inserting BTI instructions after calls to setjmp.
Calls with 'returns-twice' are lowered to a new pseudo-instruction
named t2CALL_BTI that is later expanded to a bundle of {tBL,t2BTI}.
We only perform this transformation when armlib is not in use.
That information is passed on by the module flags.
This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:
https://developer.arm.com/documentation/ddi0553/latest
The following people contributed to this patch:
- Alexandros Lamprineas
- Ties Stuij
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112427
Files:
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/test/CodeGen/ARM/setjmp-bti-basic.ll
llvm/test/CodeGen/ARM/setjmp-bti-outliner.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112427.381911.patch
Type: text/x-patch
Size: 7642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211025/0c45b50c/attachment.bin>
More information about the llvm-commits
mailing list