Hi, Got a small bugfix here regarding BTIs and trampolines.
If two functions require trampolines, and the first has BTI enabled while the second doesn't, the generated template will be lacking a BTI instruction. This patch fixes this by always adding a BTI instruction, which is safe as BTI instructions are ignored on unsupported architecture versions. I don't have write access, so could someone commit for me? Bootstrapped and tested on aarch64 with no regressions. gcc/ChangeLog: 2020-06-29 Omar Tahir omar.ta...@arm.com * config/aarch64/aarch64.c (aarch64_asm_trampoline_template): Always generate a BTI instruction. gcc/testsuite/ChangeLog: 2020-06-29 Omar Tahir omar.ta...@arm.com * gcc.target/aarch64/bti-4.c: New test.
trampoline_bti.patch
Description: trampoline_bti.patch