mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-05-13 18:45:55 +00:00
Get rid of the annoying blank lines before labels.
llvm-svn: 46667
This commit is contained in:
parent
78e2e2cd07
commit
f61d1115af
@ -1281,18 +1281,18 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
|
|||||||
/// printLabel - This method prints a local label used by debug and
|
/// printLabel - This method prints a local label used by debug and
|
||||||
/// exception handling tables.
|
/// exception handling tables.
|
||||||
void AsmPrinter::printLabel(const MachineInstr *MI) const {
|
void AsmPrinter::printLabel(const MachineInstr *MI) const {
|
||||||
O << "\n" << TAI->getPrivateGlobalPrefix()
|
O << TAI->getPrivateGlobalPrefix()
|
||||||
<< "label" << MI->getOperand(0).getImm() << ":\n";
|
<< "label" << MI->getOperand(0).getImm() << ":\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsmPrinter::printLabel(unsigned Id) const {
|
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
|
/// printDeclare - This method prints a local variable declaration used by
|
||||||
/// debug tables.
|
/// debug tables.
|
||||||
void AsmPrinter::printDeclare(const MachineInstr *MI) const {
|
void AsmPrinter::printDeclare(const MachineInstr *MI) const {
|
||||||
O << "\n";
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
|
/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
|
||||||
|
@ -786,7 +786,6 @@ void ARMAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
case ARM::tPICADD:
|
case ARM::tPICADD:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
O << "\t";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
@ -177,7 +177,6 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
++EmittedInsts;
|
++EmittedInsts;
|
||||||
O << "\t";
|
|
||||||
if (!printInstruction(II)) {
|
if (!printInstruction(II)) {
|
||||||
assert(0 && "Unhandled instruction in asm writer!");
|
assert(0 && "Unhandled instruction in asm writer!");
|
||||||
abort();
|
abort();
|
||||||
|
@ -465,7 +465,6 @@ LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF)
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printMachineInstruction(II);
|
printMachineInstruction(II);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,6 @@ bool IA64AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printMachineInstruction(II);
|
printMachineInstruction(II);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,7 +304,6 @@ runOnMachineFunction(MachineFunction &MF)
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printInstruction(II);
|
printInstruction(II);
|
||||||
++EmittedInsts;
|
++EmittedInsts;
|
||||||
}
|
}
|
||||||
|
@ -610,7 +610,6 @@ bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printMachineInstruction(II);
|
printMachineInstruction(II);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -833,7 +832,6 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
||||||
II != IE; ++II) {
|
II != IE; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printMachineInstruction(II);
|
printMachineInstruction(II);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ FunctionPass *llvm::createSparcCodePrinterPass(std::ostream &o,
|
|||||||
return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
|
return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// runOnMachineFunction - This uses the printMachineInstruction()
|
/// runOnMachineFunction - This uses the printInstruction()
|
||||||
/// method to print assembly for each instruction.
|
/// method to print assembly for each instruction.
|
||||||
///
|
///
|
||||||
bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||||
@ -121,7 +121,6 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printInstruction(II);
|
printInstruction(II);
|
||||||
++EmittedInsts;
|
++EmittedInsts;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,6 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
||||||
II != IE; ++II) {
|
II != IE; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printMachineInstruction(II);
|
printMachineInstruction(II);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,6 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
|
||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
O << "\t";
|
|
||||||
printMachineInstruction(II);
|
printMachineInstruction(II);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -620,6 +620,7 @@ void AsmWriterEmitter::run(std::ostream &O) {
|
|||||||
O << "\";\n\n";
|
O << "\";\n\n";
|
||||||
|
|
||||||
O << " if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n"
|
O << " if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n"
|
||||||
|
<< " O << \"\\t\";\n"
|
||||||
<< " printInlineAsm(MI);\n"
|
<< " printInlineAsm(MI);\n"
|
||||||
<< " return true;\n"
|
<< " return true;\n"
|
||||||
<< " } else if (MI->getOpcode() == TargetInstrInfo::LABEL) {\n"
|
<< " } else if (MI->getOpcode() == TargetInstrInfo::LABEL) {\n"
|
||||||
@ -630,6 +631,8 @@ void AsmWriterEmitter::run(std::ostream &O) {
|
|||||||
<< " return true;\n"
|
<< " return true;\n"
|
||||||
<< " }\n\n";
|
<< " }\n\n";
|
||||||
|
|
||||||
|
O << " O << \"\\t\";\n\n";
|
||||||
|
|
||||||
O << " // Emit the opcode for the instruction.\n"
|
O << " // Emit the opcode for the instruction.\n"
|
||||||
<< " unsigned Bits = OpInfo[MI->getOpcode()];\n"
|
<< " unsigned Bits = OpInfo[MI->getOpcode()];\n"
|
||||||
<< " if (Bits == 0) return false;\n"
|
<< " if (Bits == 0) return false;\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user