[PATCH] D146630: [AArch64] Add Missing Custom Target Operands

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 07:15:18 PDT 2023


lenary created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
lenary requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146630

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146630.507352.patch
Type: text/x-patch
Size: 5423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230322/84375447/attachment.bin>


More information about the llvm-commits mailing list