summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2018-10-08 14:09:15 +0000
committerOliver Stannard <oliver.stannard@arm.com>2018-10-08 14:09:15 +0000
commitc922116a5152b80fad932b6a963973ffb6eee76c (patch)
tree1bc3df1f4578547a337273ba6ae0a02ee4c32fd7 /llvm/lib/Support
parent250e5a5b655f67d58470533a7b21ce38d7946d50 (diff)
downloadbcm5719-llvm-c922116a5152b80fad932b6a963973ffb6eee76c.tar.gz
bcm5719-llvm-c922116a5152b80fad932b6a963973ffb6eee76c.zip
[AArch64][v8.5A] Restrict indirect tail calls to use x16/17 only when using BTI
When branch target identification is enabled, all indirectly-callable functions start with a BTI C instruction. this instruction can only be the target of certain indirect branches (direct branches and fall-through are not affected): - A BLR instruction, in either a protected or unprotected page. - A BR instruction in a protected page, using x16 or x17. - A BR instruction in an unprotected page, using any register. Without BTI, we can use any non call-preserved register to hold the address for an indirect tail call. However, when BTI is enabled, then the code being compiled might be loaded into a BTI-protected page, where only x16 and x17 can be used for indirect tail calls. Legacy code withiout this restriction can still indirectly tail-call BTI-protected functions, because they will be loaded into an unprotected page, so any register is allowed. Differential revision: https://reviews.llvm.org/D52868 llvm-svn: 343968
Diffstat (limited to 'llvm/lib/Support')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud