}
}
}
- O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd() << '\n';
+ O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd();
+ OutStreamer.AddBlankLine();
}
/// printImplicitDef - This method prints the specified machine instruction
if (!VerboseAsm) return;
O.PadToColumn(MAI->getCommentColumn());
O << MAI->getCommentString() << " implicit-def: "
- << TRI->getName(MI->getOperand(0).getReg()) << '\n';
+ << TRI->getName(MI->getOperand(0).getReg());
+ OutStreamer.AddBlankLine();
}
void AsmPrinter::printKill(const MachineInstr *MI) const {
assert(op.isReg() && "KILL instruction must have only register operands");
O << ' ' << TRI->getName(op.getReg()) << (op.isDef() ? "<def>" : "<kill>");
}
- O << '\n';
+ OutStreamer.AddBlankLine();
}
/// printLabel - This method prints a local label used by debug and
/// exception handling tables.
void AsmPrinter::printLabelInst(const MachineInstr *MI) const {
printLabel(MI->getOperand(0).getImm());
- O << '\n';
+ OutStreamer.AddBlankLine();
}
void AsmPrinter::printLabel(unsigned Id) const {
O << "-.";
O << ')';
}
- O << '\n';
+ OutStreamer.AddBlankLine();
}
void getAnalysisUsage(AnalysisUsage &AU) const {
// data itself.
if (!strcmp(Modifier, "label")) {
unsigned ID = MI->getOperand(OpNum).getImm();
- O << *GetCPISymbol(ID) << ":\n";
+ OutStreamer.EmitLabel(GetCPISymbol(ID));
} else {
assert(!strcmp(Modifier, "cpentry") && "Unknown modifier for CPE");
unsigned CPI = MI->getOperand(OpNum).getIndex();
EmitAlignment(2);
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
}
void printInstruction(const MachineInstr *MI);
void EmitInstruction(const MachineInstr *MI) {
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
static const char *getRegisterName(unsigned RegNo);
void EmitInstruction(const MachineInstr *MI) {
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
unsigned AsmVariant, const char *ExtraCode);
void EmitInstruction(const MachineInstr *MI) {
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
void printOp(const MachineOperand &MO);
void printInstruction(const MachineInstr *MI); // autogenerated.
void EmitInstruction(const MachineInstr *MI) {
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
virtual void EmitFunctionBodyStart();
virtual void EmitFunctionBodyEnd();
void PIC16AsmPrinter::EmitInstruction(const MachineInstr *MI) {
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
static int getFunctionColor(const Function *F) {
O << ", ";
printOperand(MI, 1);
O << ", " << (unsigned int)SH;
- O << '\n';
+ OutStreamer.AddBlankLine();
return;
}
}
printOperand(MI, 0);
O << ", ";
printOperand(MI, 1);
- O << '\n';
+ OutStreamer.AddBlankLine();
return;
}
O << ", ";
printOperand(MI, 1);
O << ", " << (unsigned int)SH;
- O << '\n';
+ OutStreamer.AddBlankLine();
return;
}
}
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/MC/MCAsmInfo.h"
+#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Target/TargetRegistry.h"
#include "llvm/ADT/StringExtras.h"
virtual void EmitInstruction(const MachineInstr *MI) {
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
void printInstruction(const MachineInstr *MI); // autogenerated.
static const char *getRegisterName(unsigned RegNo);
void SystemZAsmPrinter::EmitInstruction(const MachineInstr *MI) {
// Call the autogenerated instruction printer routines.
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum){
if (MI->getOperand(0).getType()==MachineOperand::MO_Register &&
MI->getOperand(0).getReg()==0) {
// Suppress offset in this case, it is not meaningful.
- O << "undef\n";
+ O << "undef";
+ OutStreamer.AddBlankLine();
return;
} else if (MI->getOperand(0).getType()==MachineOperand::MO_FPImmediate) {
// This is more naturally done in printOperand, but since the only use
}
O << "+";
printOperand(MI, NOps-2);
- O << '\n';
+ OutStreamer.AddBlankLine();
return;
}
case X86::MOVPC32r: {
MCInst TmpInst;
MCInstLowering.Lower(MI, TmpInst);
-
OutStreamer.EmitInstruction(TmpInst);
}
unsigned src, dst, srcSR, dstSR;
if (TM.getInstrInfo()->isMoveInstr(*MI, src, dst, srcSR, dstSR)) {
O << "\tmov " << getRegisterName(dst) << ", ";
- O << getRegisterName(src) << '\n';
+ O << getRegisterName(src);
+ OutStreamer.AddBlankLine();
return;
}
printInstruction(MI);
- O << '\n';
+ OutStreamer.AddBlankLine();
}
// Force static initialization.