diff options
author | ostannard <oliver.stannard@arm.com> | 2024-02-08 15:31:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 15:31:54 +0000 |
commit | 5452cbc4a6bfb905fedeacaa6f27895e249da1e5 (patch) | |
tree | 9ee01bee0e50bfa9a75fca1024db387de869273c /clang/lib/Frontend/ModuleDependencyCollector.cpp | |
parent | 3e33b6f5de6905c98395a77b41d474b87ef9e677 (diff) | |
download | llvm-5452cbc4a6bfb905fedeacaa6f27895e249da1e5.zip llvm-5452cbc4a6bfb905fedeacaa6f27895e249da1e5.tar.gz llvm-5452cbc4a6bfb905fedeacaa6f27895e249da1e5.tar.bz2 |
[AArch64] Indirect tail-calls cannot use x16 with pac-ret+pc (#81020)
When using -mbranch-protection=pac-ret+pc, x16 is used in the function
epilogue to hold the address of the signing instruction. This is used by
a HINT instruction which can only use x16, so we can't change this. This
means that we can't use it to hold the function pointer for an indirect
tail-call.
There is existing code to force indirect tail-calls to use x16 or x17
when BTI is enabled, so there are now 4 combinations:
bti pac-ret+pc Valid function pointer registers
off off Any non callee-saved register
on off x16 or x17
off on Any non callee-saved register except x16
on on x17
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
0 files changed, 0 insertions, 0 deletions