[all-commits] [llvm/llvm-project] da3376: [AArch64] Emit HINT instead of PAC insns in Armv8....

Pablo Barrio via All-commits all-commits at lists.llvm.org
Mon Jan 13 06:15:57 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: da33762de8531914d4d0dae16bfce2192f02bc79
      https://github.com/llvm/llvm-project/commit/da33762de8531914d4d0dae16bfce2192f02bc79
  Author: Pablo Barrio <pablo.barrio at arm.com>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-cfi.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-diff-scope-same-key.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-non-leaf.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-same-scope-diff-key.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-same-scope-same-key-a.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-same-scope-same-key-b.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-subtarget.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-thunk.ll
    M llvm/test/CodeGen/AArch64/sign-return-address.ll
    M llvm/test/CodeGen/AArch64/speculation-hardening-dagisel.ll
    M llvm/test/CodeGen/AArch64/speculation-hardening-loads.ll
    M llvm/test/MC/AArch64/armv8.3a-signed-pointer.s

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

Summary:
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.

Reviewers: samparker, chill, LukeCheeseman

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71658




More information about the All-commits mailing list