[llvm] d2c4ac9 - [AVR] Add PrintMethod for operand memspi
Ben Shi via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 01:32:10 PDT 2022
Author: Ben Shi
Date: 2022-05-09T08:31:49Z
New Revision: d2c4ac979b2acf2f9675fa7ab78f827afeed95bc
URL: https://github.com/llvm/llvm-project/commit/d2c4ac979b2acf2f9675fa7ab78f827afeed95bc
DIFF: https://github.com/llvm/llvm-project/commit/d2c4ac979b2acf2f9675fa7ab78f827afeed95bc.diff
LOG: [AVR] Add PrintMethod for operand memspi
Reviewed By: Patryk27
Differential Revision: https://reviews.llvm.org/D124913
Added:
Modified:
llvm/lib/Target/AVR/AVRInstrInfo.td
llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/AVR/AVRInstrInfo.td b/llvm/lib/Target/AVR/AVRInstrInfo.td
index b04c5978dd008..f20ba5edf208c 100644
--- a/llvm/lib/Target/AVR/AVRInstrInfo.td
+++ b/llvm/lib/Target/AVR/AVRInstrInfo.td
@@ -183,7 +183,10 @@ def memri : Operand<iPTR> {
}
// 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";
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h b/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
index 11f55f6d253b6..54dad3098385b 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
+++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
@@ -43,6 +43,9 @@ class AVRInstPrinter : public MCInstPrinter {
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;
More information about the llvm-commits
mailing list