aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/tutorial
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2022-03-14 10:24:45 +0000
committerDavid Spickett <david.spickett@linaro.org>2022-03-23 09:51:02 +0000
commiteb5ecbbcbb6ce38e29237ab5d17156fcb2e96e74 (patch)
treec71db334a50e5a96a4a663828762dc13114422d4 /llvm/docs/tutorial
parenta451a291278b22b031b2b6d8ca4a3b2517a491f6 (diff)
downloadllvm-eb5ecbbcbb6ce38e29237ab5d17156fcb2e96e74.zip
llvm-eb5ecbbcbb6ce38e29237ab5d17156fcb2e96e74.tar.gz
llvm-eb5ecbbcbb6ce38e29237ab5d17156fcb2e96e74.tar.bz2
[llvm][AArch64] Insert "bti j" after call to setjmp
Some implementations of setjmp will end with a br instead of a ret. This means that the next instruction after a call to setjmp must be a "bti j" (j for jump) to make this work when branch target identification is enabled. The BTI extension was added in armv8.5-a but the bti instruction is in the hint space. This means we can emit it for any architecture version as long as branch target enforcement flags are passed. The starting point for the hint number is 32 then call adds 2, jump adds 4. Hence "hint #36" for a "bti j" (and "hint #34" for the "bti c" you see at the start of functions). The existing Arm command line option -mno-bti-at-return-twice has been applied to AArch64 as well. Support is added to SelectionDAG Isel and GlobalIsel. FastIsel will defer to SelectionDAG. Based on the change done for M profile Arm in https://reviews.llvm.org/D112427 Fixes #48888 Reviewed By: danielkiss Differential Revision: https://reviews.llvm.org/D121707
Diffstat (limited to 'llvm/docs/tutorial')
0 files changed, 0 insertions, 0 deletions