[PATCH] D59460: Use generic operand printer for modifiers
Afonso Bordado via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 16 10:32:52 PDT 2019
INdek created this revision.
INdek added reviewers: asl, nlewycky.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Fix Generic CodeGen test `CodeGen/Generic/asm-large-immediate.ll` by using the
generic operand printer when a modifier is given.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59460
Files:
llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
Index: llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
===================================================================
--- llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
+++ llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
@@ -131,8 +131,15 @@
unsigned AsmVariant,
const char *ExtraCode, raw_ostream &O) {
// Does this asm operand have a single letter operand modifier?
- if (ExtraCode && ExtraCode[0])
- return true; // Unknown modifier.
+ if (ExtraCode && ExtraCode[0]) {
+ if (ExtraCode[1] != 0) return true; // Unknown modifier.
+
+ switch (ExtraCode[0]) {
+ default:
+ // See if this is a generic print operand
+ return AsmPrinter::PrintAsmOperand(MI, OpNo, AsmVariant, ExtraCode, O);
+ }
+ }
printOperand(MI, OpNo, O);
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59460.190975.patch
Type: text/x-patch
Size: 850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190316/116c64a4/attachment.bin>
More information about the llvm-commits
mailing list