[all-commits] [llvm/llvm-project] 619444: [AArch64] Add Missing Custom Target Operands

Sam Elliott via All-commits all-commits at lists.llvm.org
Thu Mar 23 08:15:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61944469625d4b3ba4a87f4f8fffefb73e9f8cdc
      https://github.com/llvm/llvm-project/commit/61944469625d4b3ba4a87f4f8fffefb73e9f8cdc
  Author: Archibald Elliott <archibald.elliott at arm.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/test/MC/AArch64/armv8.3a-signed-pointer.s

  Log Message:
  -----------
  [AArch64] Add Missing Custom Target Operands

I noticed, when examining the generated Asm Matcher table, that some of
these custom immediate operands are missing, and so we are not parsing
some hint aliases into the correct MCInst.

Where this becomes apparent is when you parse e.g. `hint #7` into an
MCInst - without these cases, it becomes the MCInst `(HINT 17)`, which
will always be printed as `hint #17`. With these cases, it becomes the
MCInst `XPACLRI`, which will be printed as `xpaclri` with pauth, or
`hint #17` without, matching how `xpaclri` is parsed.

We only handle some specific hint aliases in this manner, usually where
these hints have specific effects that need to be modelled for accurate
code-generation. Otherwise, we just use the normal `InstAlias` system
to have the aliases parsed into a `(HINT N)` MCInst.

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




More information about the All-commits mailing list