[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)
Peter Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 08:19:23 PDT 2025
================
@@ -275,18 +275,33 @@ class MachineBasicBlock
/// of a terminator, exception-handling target, or jump table. This is
/// either the result of an IR-level "blockaddress", or some form
/// of target-specific branch lowering.
+ ///
+ /// The name of this function `hasAddressTaken` implies that the address of
+ /// the block is known and used in a general sense, but not necessarily that
+ /// the address is used by an indirect branch instruction. So branch target
+ /// enforcement need not put a BTI instruction (or equivalent) at the start
----------------
smithp35 wrote:
If we're looking for a more architecture neutral term than BTI instruction (or equivalent) the Wikipedia term "Branch Target" instruction could be useful.
https://en.wikipedia.org/wiki/Indirect_branch_tracking
As an Arm person I'm personally not in any hurry to change this :-)
https://github.com/llvm/llvm-project/pull/141562
More information about the cfe-commits
mailing list