From da3d79642444858ccbd55ce1fa5aa5aa25f4bba2 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sun, 11 Oct 2009 19:13:34 +0000 Subject: [PATCH] Implement asm printing for inline asm memory operands git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83783 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp b/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp index ad40fd4776d..0f70e483159 100644 --- a/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp +++ b/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp @@ -64,6 +64,9 @@ namespace { bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); + bool PrintAsmMemoryOperand(const MachineInstr *MI, + unsigned OpNo, unsigned AsmVariant, + const char *ExtraCode); void emitFunctionHeader(const MachineFunction &MF); bool runOnMachineFunction(MachineFunction &F); @@ -262,6 +265,16 @@ bool MSP430AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, return false; } +bool MSP430AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, + unsigned OpNo, unsigned AsmVariant, + const char *ExtraCode) { + if (ExtraCode && ExtraCode[0]) { + return true; // Unknown modifier. + } + printSrcMemOperand(MI, OpNo); + return false; +} + // Force static initialization. extern "C" void LLVMInitializeMSP430AsmPrinter() { RegisterAsmPrinter X(TheMSP430Target); -- 2.34.1