[all-commits] [llvm/llvm-project] 1d19b7: [AArch64][PAC] Introduce AArch64::PAC pseudo instr...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Sat Jun 28 02:50:38 PDT 2025


  Branch: refs/heads/users/atrosinenko/pauth-sign-imm-modifier
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d19b7197c2634d8d1badd3e2bd7cae84bdb513e
      https://github.com/llvm/llvm-project/commit/1d19b7197c2634d8d1badd3e2bd7cae84bdb513e
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-06-28 (Sat, 28 Jun 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/test/CodeGen/AArch64/ptrauth-isel.ll

  Log Message:
  -----------
  [AArch64][PAC] Introduce AArch64::PAC pseudo instruction

Introduce a pseudo instruction to be selected instead of a pair of
`MOVKXi` and `PAC[DI][AB]` carrying address and immediate modifiers
as separate operands. The new pseudo instruction is expanded in
AsmPrinter, so that MOVKXi is emitted immediately before `PAC[DI][AB]`.
This way, an attacker cannot control the immediate modifier used to sign
the value, even if address modifier can be substituted.

To simplify the instruction selection, select AArch64::PAC pseudo using
TableGen pattern and post-process its $AddrDisc operand by custom
inserter hook - this eliminates duplication of the logic for DAGISel
and GlobalISel. Furthermore, this improves cross-BB analysis in case of
DAGISel.


  Commit: 4c3b8d3f89d2d06e2dc24b90a58e4c0630c347a3
      https://github.com/llvm/llvm-project/commit/4c3b8d3f89d2d06e2dc24b90a58e4c0630c347a3
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-06-28 (Sat, 28 Jun 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/ptrauth-isel.ll

  Log Message:
  -----------
  [AArch64][PAC] Rework discriminator analysis in AUT and AUTPAC

Make use of post-processing the discriminator components by custom
inserter hook to eliminate duplication for DAGISel and GlobalISel and
improve cross-BB analysis for DAGISel.


Compare: https://github.com/llvm/llvm-project/compare/1d19b7197c26%5E...4c3b8d3f89d2

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list