/// printLabel - This method prints a local label used by debug and
/// exception handling tables.
void AsmPrinter::printLabel(const MachineInstr *MI) const {
- O << "\n" << TAI->getPrivateGlobalPrefix()
+ O << TAI->getPrivateGlobalPrefix()
<< "label" << MI->getOperand(0).getImm() << ":\n";
}
void AsmPrinter::printLabel(unsigned Id) const {
- O << "\n" << TAI->getPrivateGlobalPrefix() << "label" << Id << ":\n";
+ O << TAI->getPrivateGlobalPrefix() << "label" << Id << ":\n";
}
/// printDeclare - This method prints a local variable declaration used by
/// debug tables.
void AsmPrinter::printDeclare(const MachineInstr *MI) const {
- O << "\n";
+ // Do nothing.
}
/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
case ARM::tPICADD:
break;
default:
- O << "\t";
break;
}
}}
II != E; ++II) {
// Print the assembly for the instruction.
++EmittedInsts;
- O << "\t";
if (!printInstruction(II)) {
assert(0 && "Unhandled instruction in asm writer!");
abort();
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printMachineInstruction(II);
}
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printMachineInstruction(II);
}
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printInstruction(II);
++EmittedInsts;
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printMachineInstruction(II);
}
}
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
II != IE; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printMachineInstruction(II);
}
}
return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
}
-/// runOnMachineFunction - This uses the printMachineInstruction()
+/// runOnMachineFunction - This uses the printInstruction()
/// method to print assembly for each instruction.
///
bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printInstruction(II);
++EmittedInsts;
}
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
II != IE; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printMachineInstruction(II);
}
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
- O << "\t";
printMachineInstruction(II);
}
}
O << "\";\n\n";
O << " if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n"
+ << " O << \"\\t\";\n"
<< " printInlineAsm(MI);\n"
<< " return true;\n"
<< " } else if (MI->getOpcode() == TargetInstrInfo::LABEL) {\n"
<< " return true;\n"
<< " }\n\n";
+ O << " O << \"\\t\";\n\n";
+
O << " // Emit the opcode for the instruction.\n"
<< " unsigned Bits = OpInfo[MI->getOpcode()];\n"
<< " if (Bits == 0) return false;\n"