[AArch64] Allow BTI mnemonics in the HINT space with BTI disabled
authorDaniel Kiss <daniel.kiss@arm.com>
Tue, 9 Jun 2020 17:56:30 +0000 (19:56 +0200)
committerDaniel Kiss <daniel.kiss@arm.com>
Tue, 9 Jun 2020 17:57:02 +0000 (19:57 +0200)
commit7a38618a20596e419abbbbb249300e812763a028
tree4e2ea7184b69e48074ff8deeb8aac901058a94cf
parentcb2d8b30ad0dc08bb151b922f5a137014ef9fc87
[AArch64] Allow BTI mnemonics in the HINT space with BTI disabled

Summary:
It is important to emit HINT instructions instead of BTI  ones when
BTI is disabled. This allows compatibility with other assemblers
(e.g. GAS).

Still, developers of assembly code will want to write code that is
compatible with both pre- and post-BTI CPUs. They could use HINT
mnemonics, but the new mnemonics are a lot more readable (e.g.
bti c instead of hint #34), and they will result in the same
encodings. So, while LLVM should not *emit* the new mnemonics when
BTI is disabled, this patch will at least make LLVM *accept*
assembly code that uses them.

Reviewers: pbarrio, tamas.petz, ostannard

Reviewed By: pbarrio, ostannard

Subscribers: ostannard, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81257
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/test/MC/AArch64/armv8.5a-bti.s