[PATCH] D92185: [SystemZ] Adding extra extended mnemonics for SystemZ target

Anirudh Prasad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 08:42:22 PST 2020


anirudhp created this revision.
anirudhp added reviewers: uweigand, jonpa, Kai.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
anirudhp requested review of this revision.

- This patch consists of the addition of some common additional extended mnemonics to the SystemZ target
- These are jnop, jct, jctg, jas, jasl, jxh, jxhg, jxle, jxleg, bru, brul, br*, br*l.
- These mnemonics and the instructions they map to are defined here <https://www.ibm.com/support/knowledgecenter/SSENW6_1.6.0/com.ibm.hlasm.v1r6.asm/asmr1023.pdf>, Chapter 4 - Branching with extended mnemonic codes
- Except for `jnop` (which is a variant of `brc 0, label`), every other mnemonic is marked as a `MnemonicAlias` since there is already a "defined" instruction with the same encoding and/or condition mask values
- `brc 0, label` doesn't have a defined extended mnemonic, thus jnop is defined using as an `InstAlias`.
- Furthermore, the `applyMnemonicAliases` function is called in the overridden parseInstruction function in SystemZAsmParser.cpp to ensure any mnemonic aliases are applied before any further processing on the instruction is done.




Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92185

Files:
  llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
  llvm/lib/Target/SystemZ/SystemZInstrFormats.td
  llvm/lib/Target/SystemZ/SystemZInstrInfo.td
  llvm/test/MC/SystemZ/insn-bad.s
  llvm/test/MC/SystemZ/insn-good.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92185.307877.patch
Type: text/x-patch
Size: 72319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201126/a1929e98/attachment.bin>


More information about the llvm-commits mailing list