[all-commits] [llvm/llvm-project] dc0b71: [AArch64][llvm] Implement HINT instructions as ali...

Jonathan Thackray via All-commits all-commits at lists.llvm.org
Sun Jun 28 18:04:26 PDT 2026


  Branch: refs/heads/users/jthackray/instructions_should_be_hints
  Home:   https://github.com/llvm/llvm-project
  Commit: dc0b71a98e6816537c571b29632e05eaf00112fa
      https://github.com/llvm/llvm-project/commit/dc0b71a98e6816537c571b29632e05eaf00112fa
  Author: Jonathan Thackray <jonathan.thackray at arm.com>
  Date:   2026-06-29 (Mon, 29 Jun 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64InstrFormats.td
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/lib/Target/AArch64/AArch64SystemOperands.td
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
    M llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp
    M llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
    M llvm/test/MC/AArch64/armv8.2a-statistical-profiling.s
    M llvm/test/MC/AArch64/armv8.4a-trace-error.s
    M llvm/test/MC/AArch64/armv8.4a-trace.s
    M llvm/test/MC/AArch64/armv8.5a-bti.s
    A llvm/test/MC/AArch64/armv9.6a-pcdphint-diagnostics.s
    M llvm/test/MC/AArch64/armv9.6a-pcdphint.s
    M llvm/test/MC/AArch64/armv9.7a-memsys.s
    M llvm/test/MC/AArch64/basic-a64-instructions.s
    M llvm/test/MC/AArch64/ras-extension.s
    M llvm/test/MC/AArch64/speculation-barriers.s

  Log Message:
  -----------
  [AArch64][llvm] Implement HINT instructions as aliases (NFCI)

Implement some `HINT`-space encodings as aliases of `HINT`
instead of dedicated instructions. Re-implement these isns:
  * bti
  * psb
  * stshh
  * stcph
  * shuh
  * tsb

Parse aliases explicitly in `AArch64AsmParser::parseHintAlias()` as they
have custom operands. Remove the (now unused) `PSB`, `BTI`, `CMH`, `PHint`
and `TSB` tablegen defs, operand classes, parser hooks and printer helpers.

Also, tighten the BTI check in the parser. The old bitmask matched non-BTI
`HINT` immediates such as `shuh/stcph`; use an exact BTI HINT encoding
check instead (`isHintSpaceBTI()`)

Add additional MC coverage for HINT aliases. The only intended functional
change is a diagnostic tweak for invalid `tsb csync` operands, which now
uses the common `HINT` alias error message codepath:
```
-//CHECK-ERROR: error: 'csync' operand expected
+//CHECK-ERROR: error: invalid operand for instruction
```

Apart from this, no other test code was modified; only new tests added.



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