Page MenuHomePhabricator

[AArch64] Allow BTI mnemonics in the HINT space with BTI disabled

Authored by danielkiss on Jun 5 2020, 5:58 AM.



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.

Diff Detail

Event Timeline

danielkiss created this revision.Jun 5 2020, 5:58 AM

This is the same logic that we applied to PAC mnemonics in I'll approve but I would recommend to wait for a few days in case anyone else has something to say.

pbarrio accepted this revision.Jun 5 2020, 8:55 AM
This revision is now accepted and ready to land.Jun 5 2020, 8:55 AM
ostannard accepted this revision.Jun 8 2020, 4:28 AM
ostannard added a subscriber: ostannard.


This revision was automatically updated to reflect the committed changes.