forked from OSchip/llvm-project
Implement asm printing for inline asm memory operands
llvm-svn: 83783
This commit is contained in:
parent
c04812c035
commit
3525a4a268
|
@ -64,6 +64,9 @@ namespace {
|
||||||
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
unsigned AsmVariant,
|
unsigned AsmVariant,
|
||||||
const char *ExtraCode);
|
const char *ExtraCode);
|
||||||
|
bool PrintAsmMemoryOperand(const MachineInstr *MI,
|
||||||
|
unsigned OpNo, unsigned AsmVariant,
|
||||||
|
const char *ExtraCode);
|
||||||
|
|
||||||
void emitFunctionHeader(const MachineFunction &MF);
|
void emitFunctionHeader(const MachineFunction &MF);
|
||||||
bool runOnMachineFunction(MachineFunction &F);
|
bool runOnMachineFunction(MachineFunction &F);
|
||||||
|
@ -262,6 +265,16 @@ bool MSP430AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
return false;
|
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.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeMSP430AsmPrinter() {
|
extern "C" void LLVMInitializeMSP430AsmPrinter() {
|
||||||
RegisterAsmPrinter<MSP430AsmPrinter> X(TheMSP430Target);
|
RegisterAsmPrinter<MSP430AsmPrinter> X(TheMSP430Target);
|
||||||
|
|
Loading…
Reference in New Issue