[PATCH] D124913: [AVR] Add PrintMethod for operand memspi

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 03:54:46 PDT 2022


benshi001 created this revision.
benshi001 added reviewers: aykevl, dylanmckay.
Herald added subscribers: Jim, hiraditya.
Herald added a project: All.
benshi001 requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124913

Files:
  llvm/lib/Target/AVR/AVRInstrInfo.td
  llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h


Index: llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
===================================================================
--- llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
+++ llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
@@ -43,6 +43,9 @@
     printPCRelImm(MI, OpNo, O);
   }
   void printMemri(const MCInst *MI, unsigned OpNo, raw_ostream &O);
+  void printMemspi(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
+    printMemri(MI, OpNo, O);
+  }
 
   // Autogenerated by TableGen.
   std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;
Index: llvm/lib/Target/AVR/AVRInstrInfo.td
===================================================================
--- llvm/lib/Target/AVR/AVRInstrInfo.td
+++ llvm/lib/Target/AVR/AVRInstrInfo.td
@@ -182,7 +182,10 @@
 }
 
 // Address operand for `SP+imm` used by STD{W}SPQRr
-def memspi : Operand<iPTR> { let MIOperandInfo = (ops GPRSP, i16imm); }
+def memspi : Operand<iPTR> {
+  let MIOperandInfo = (ops GPRSP, i16imm);
+  let PrintMethod = "printMemspi";
+}
 
 def relbrtarget_7 : Operand<OtherVT> {
   let PrintMethod = "printPCRelImm";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124913.426959.patch
Type: text/x-patch
Size: 1112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220504/a9693e23/attachment.bin>


More information about the llvm-commits mailing list