[PATCH] D71658: [AArch64] Emit HINT instead of PAC insns in Armv8.2-A or below

Pablo Barrio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 05:30:41 PST 2019


pbarrio created this revision.
pbarrio added reviewers: samparker, chill, LukeCheeseman.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.

The Pointer Authentication Extension (PAC) was added in Armv8.3-A. Some
instructions are implemented in the HINT space to allow compiling code
common to CPUs regardless of whether they feature PAC or not, and still
benefit from PAC protection in the PAC-enabled CPUs.

The 8.3-specific mnemonics were currently enabled in any architecture, and
LLVM was emitting them in assembly files when PAC code generation was
enabled. This was ok for compilations where both LLVM codegen and the
integrated assembler were used. However, the LLVM codegen was not
compatible with other assemblers (e.g. GAS). Given the fact that the
approach from these assemblers (i.e. to disallow Armv8.3-A mnemonics if
compiling for Armv8.2-A or lower) is entirely reasonable, this patch makes
LLVM to emit HINT when building for Armv8.2-A and below, instead of
PACIASP, AUTIASP and friends. Then, LLVM assembly should be compatible
with other assemblers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71658

Files:
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/test/CodeGen/AArch64/sign-return-address.ll
  llvm/test/CodeGen/AArch64/speculation-hardening-dagisel.ll
  llvm/test/CodeGen/AArch64/speculation-hardening-loads.ll
  llvm/test/MC/AArch64/armv8.3a-signed-pointer.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71658.234521.patch
Type: text/x-patch
Size: 11106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191218/4eeea19c/attachment.bin>


More information about the llvm-commits mailing list