[PATCH] D82088: [AVR] Disassemble instructions with fixed Z operand

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 06:30:05 PDT 2020


aykevl created this revision.
aykevl added a reviewer: dylanmckay.
aykevl added a project: LLVM.
Herald added subscribers: Jim, hiraditya.

Some instructions have a fixed Z register and don't have an explicit register operand. This can be worked around by simply printing the operand directly if the particular register class is detected.

The `lpm` and `elpm` instructions also needed a custom decoder, which is also included in this patch.

---

Note: I don't know whether the way I've made the Z register printable is the correct way. Maybe the register should be added to the `MCInst` instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82088

Files:
  llvm/lib/Target/AVR/AVRInstrFormats.td
  llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp
  llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp
  llvm/test/MC/AVR/inst-elpm.s
  llvm/test/MC/AVR/inst-lac.s
  llvm/test/MC/AVR/inst-las.s
  llvm/test/MC/AVR/inst-lat.s
  llvm/test/MC/AVR/inst-lpm.s
  llvm/test/MC/AVR/inst-spm.s
  llvm/test/MC/AVR/inst-xch.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82088.271685.patch
Type: text/x-patch
Size: 7721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200618/239799d4/attachment.bin>


More information about the llvm-commits mailing list