return "Blackfin Assembly Printer";
}
- void printOperand(const MachineInstr *MI, int opNum);
- void printMemoryOperand(const MachineInstr *MI, int opNum);
- void printInstruction(const MachineInstr *MI); // autogenerated.
+ void printOperand(const MachineInstr *MI, int opNum, raw_ostream &O);
+ void printMemoryOperand(const MachineInstr *MI, int opNum, raw_ostream &O);
+ void printInstruction(const MachineInstr *MI, raw_ostream &O);// autogen'd.
static const char *getRegisterName(unsigned RegNo);
void EmitInstruction(const MachineInstr *MI) {
- printInstruction(MI);
+ printInstruction(MI, O);
OutStreamer.AddBlankLine();
}
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
RegisterAsmPrinter<BlackfinAsmPrinter> X(TheBlackfinTarget);
}
-void BlackfinAsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
- const MachineOperand &MO = MI->getOperand (opNum);
+void BlackfinAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
+ raw_ostream &O) {
+ const MachineOperand &MO = MI->getOperand(opNum);
switch (MO.getType()) {
case MachineOperand::MO_Register:
assert(TargetRegisterInfo::isPhysicalRegister(MO.getReg()) &&
}
}
-void BlackfinAsmPrinter::printMemoryOperand(const MachineInstr *MI, int opNum) {
- printOperand(MI, opNum);
+void BlackfinAsmPrinter::printMemoryOperand(const MachineInstr *MI, int opNum,
+ raw_ostream &O) {
+ printOperand(MI, opNum, O);
if (MI->getOperand(opNum+1).isImm() && MI->getOperand(opNum+1).getImm() == 0)
return;
O << " + ";
- printOperand(MI, opNum+1);
+ printOperand(MI, opNum+1, O);
}
/// PrintAsmOperand - Print out an operand for an inline asm expression.
}
}
- printOperand(MI, OpNo);
+ printOperand(MI, OpNo, O);
return false;
}
return true; // Unknown modifier
O << '[';
- printOperand(MI, OpNo);
+ printOperand(MI, OpNo, O);
O << ']';
return false;