forked from OSchip/llvm-project
Add memory printing support for PPC. Input memory operands now work with
inline asms! :) llvm-svn: 26365
This commit is contained in:
parent
1d08c6534c
commit
7674d90fa1
|
@ -98,6 +98,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 printU5ImmOperand(const MachineInstr *MI, unsigned OpNo) {
|
||||
unsigned char value = MI->getOperand(OpNo).getImmedValue();
|
||||
|
@ -187,7 +190,7 @@ namespace {
|
|||
unsigned RegNo = enumRegToMachineReg(CCReg);
|
||||
O << (0x80 >> RegNo);
|
||||
}
|
||||
// The new addressing mode printers, currently empty
|
||||
// The new addressing mode printers.
|
||||
void printMemRegImm(const MachineInstr *MI, unsigned OpNo) {
|
||||
printSymbolLo(MI, OpNo);
|
||||
O << '(';
|
||||
|
@ -419,6 +422,14 @@ bool PPCAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
|||
return false;
|
||||
}
|
||||
|
||||
bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
||||
unsigned AsmVariant,
|
||||
const char *ExtraCode) {
|
||||
if (ExtraCode && ExtraCode[0])
|
||||
return true; // Unknown modifier.
|
||||
printMemRegReg(MI, OpNo);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// printMachineInstruction -- Print out a single PowerPC MI in Darwin syntax to
|
||||
/// the current output stream.
|
||||
|
|
Loading…
Reference in New Issue