1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Adjust to capitalized AsmPrinter method names

llvm-svn: 24456
This commit is contained in:
Chris Lattner 2005-11-21 07:51:23 +00:00
parent 29dcb4d3ef
commit 3e2c6c1d15
6 changed files with 32 additions and 32 deletions

View File

@ -169,7 +169,7 @@ void AlphaAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
/// method to print assembly for each instruction. /// method to print assembly for each instruction.
/// ///
bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) { bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
setupMachineFunction(MF); SetupMachineFunction(MF);
O << "\n\n"; O << "\n\n";
// Print out constants referenced by the function // Print out constants referenced by the function
@ -177,7 +177,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function. // Print out labels for the function.
SwitchSection("\t.section .text", MF.getFunction()); SwitchSection("\t.section .text", MF.getFunction());
emitAlignment(4); EmitAlignment(4);
O << "\t.globl " << CurrentFnName << "\n"; O << "\t.globl " << CurrentFnName << "\n";
O << "\t.ent " << CurrentFnName << "\n"; O << "\t.ent " << CurrentFnName << "\n";
@ -218,10 +218,10 @@ void AlphaAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
SwitchSection("\t.section .rodata", 0); SwitchSection("\t.section .rodata", 0);
for (unsigned i = 0, e = CP.size(); i != e; ++i) { for (unsigned i = 0, e = CP.size(); i != e; ++i) {
emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); EmitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i
<< ":\t\t\t\t\t" << CommentString << *CP[i] << "\n"; << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
emitGlobalConstant(CP[i]); EmitGlobalConstant(CP[i]);
} }
} }
@ -285,7 +285,7 @@ bool AlphaAsmPrinter::doFinalization(Module &M) {
abort(); abort();
} }
emitAlignment(Align); EmitAlignment(Align);
O << "\t.type " << name << ",@object\n"; O << "\t.type " << name << ",@object\n";
O << "\t.size " << name << "," << Size << "\n"; O << "\t.size " << name << "," << Size << "\n";
O << name << ":\t\t\t\t# "; O << name << ":\t\t\t\t# ";
@ -293,7 +293,7 @@ bool AlphaAsmPrinter::doFinalization(Module &M) {
O << " = "; O << " = ";
WriteAsOperand(O, C, false, false, &M); WriteAsOperand(O, C, false, false, &M);
O << "\n"; O << "\n";
emitGlobalConstant(C); EmitGlobalConstant(C);
} }
} }

View File

@ -60,10 +60,10 @@ void IA64SharedAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
// FIXME: would be nice to have rodata (no 'w') when appropriate? // FIXME: would be nice to have rodata (no 'w') when appropriate?
SwitchSection("\n\t.section .data, \"aw\", \"progbits\"\n", 0); SwitchSection("\n\t.section .data, \"aw\", \"progbits\"\n", 0);
for (unsigned i = 0, e = CP.size(); i != e; ++i) { for (unsigned i = 0, e = CP.size(); i != e; ++i) {
emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); EmitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i
<< ":\t\t\t\t\t" << CommentString << *CP[i] << "\n"; << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
emitGlobalConstant(CP[i]); EmitGlobalConstant(CP[i]);
} }
} }
@ -120,7 +120,7 @@ bool IA64SharedAsmPrinter::doFinalization(Module &M) {
abort(); abort();
} }
emitAlignment(Align); EmitAlignment(Align);
O << "\t.type " << name << ",@object\n"; O << "\t.type " << name << ",@object\n";
O << "\t.size " << name << "," << Size << "\n"; O << "\t.size " << name << "," << Size << "\n";
O << name << ":\t\t\t\t// "; O << name << ":\t\t\t\t// ";
@ -128,7 +128,7 @@ bool IA64SharedAsmPrinter::doFinalization(Module &M) {
O << " = "; O << " = ";
WriteAsOperand(O, C, false, false, &M); WriteAsOperand(O, C, false, false, &M);
O << "\n"; O << "\n";
emitGlobalConstant(C); EmitGlobalConstant(C);
} }
} }
@ -260,7 +260,7 @@ namespace {
/// method to print assembly for each instruction. /// method to print assembly for each instruction.
/// ///
bool IA64AsmPrinter::runOnMachineFunction(MachineFunction &MF) { bool IA64AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
setupMachineFunction(MF); SetupMachineFunction(MF);
O << "\n\n"; O << "\n\n";
// Print out constants referenced by the function // Print out constants referenced by the function
@ -269,7 +269,7 @@ bool IA64AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function. // Print out labels for the function.
SwitchSection("\n\t.section .text, \"ax\", \"progbits\"\n", MF.getFunction()); SwitchSection("\n\t.section .text, \"ax\", \"progbits\"\n", MF.getFunction());
// ^^ means "Allocated instruXions in mem, initialized" // ^^ means "Allocated instruXions in mem, initialized"
emitAlignment(5); EmitAlignment(5);
O << "\t.global\t" << CurrentFnName << "\n"; O << "\t.global\t" << CurrentFnName << "\n";
O << "\t.type\t" << CurrentFnName << ", @function\n"; O << "\t.type\t" << CurrentFnName << ", @function\n";
O << CurrentFnName << ":\n"; O << CurrentFnName << ":\n";

View File

@ -382,7 +382,7 @@ void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
/// method to print assembly for each instruction. /// method to print assembly for each instruction.
/// ///
bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
setupMachineFunction(MF); SetupMachineFunction(MF);
O << "\n\n"; O << "\n\n";
// Print out constants referenced by the function // Print out constants referenced by the function
@ -391,7 +391,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function. // Print out labels for the function.
const Function *F = MF.getFunction(); const Function *F = MF.getFunction();
SwitchSection(".text", F); SwitchSection(".text", F);
emitAlignment(4, F); EmitAlignment(4, F);
if (!F->hasInternalLinkage()) if (!F->hasInternalLinkage())
O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.globl\t" << CurrentFnName << "\n";
O << CurrentFnName << ":\n"; O << CurrentFnName << ":\n";
@ -436,12 +436,12 @@ void DarwinAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
// FIXME: force doubles to be naturally aligned. We should handle this // FIXME: force doubles to be naturally aligned. We should handle this
// more correctly in the future. // more correctly in the future.
if (CP[i]->getType() == Type::DoubleTy) if (CP[i]->getType() == Type::DoubleTy)
emitAlignment(3); EmitAlignment(3);
else else
emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); EmitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
O << PrivateGlobalPrefix << "CPI" << FunctionNumber << '_' << i O << PrivateGlobalPrefix << "CPI" << FunctionNumber << '_' << i
<< ":\t\t\t\t\t" << CommentString << *CP[i] << '\n'; << ":\t\t\t\t\t" << CommentString << *CP[i] << '\n';
emitGlobalConstant(CP[i]); EmitGlobalConstant(CP[i]);
} }
} }
@ -507,9 +507,9 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
abort(); abort();
} }
emitAlignment(Align, I); EmitAlignment(Align, I);
O << name << ":\t\t\t\t; '" << I->getName() << "'\n"; O << name << ":\t\t\t\t; '" << I->getName() << "'\n";
emitGlobalConstant(C); EmitGlobalConstant(C);
} }
} }
@ -520,7 +520,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
if (PICEnabled) { if (PICEnabled) {
O << ".data\n"; O << ".data\n";
O << ".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32\n"; O << ".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32\n";
emitAlignment(2); EmitAlignment(2);
O << "L" << *i << "$stub:\n"; O << "L" << *i << "$stub:\n";
O << "\t.indirect_symbol " << *i << "\n"; O << "\t.indirect_symbol " << *i << "\n";
O << "\tmflr r0\n"; O << "\tmflr r0\n";
@ -539,7 +539,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
O << "\t.long dyld_stub_binding_helper\n"; O << "\t.long dyld_stub_binding_helper\n";
} else { } else {
O << "\t.section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16\n"; O << "\t.section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16\n";
emitAlignment(4); EmitAlignment(4);
O << "L" << *i << "$stub:\n"; O << "L" << *i << "$stub:\n";
O << "\t.indirect_symbol " << *i << "\n"; O << "\t.indirect_symbol " << *i << "\n";
O << "\tlis r11,ha16(L" << *i << "$lazy_ptr)\n"; O << "\tlis r11,ha16(L" << *i << "$lazy_ptr)\n";
@ -649,7 +649,7 @@ void AIXAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
<< "\n"; << "\n";
O << PrivateGlobalPrefix << "CPI" << FunctionNumber << '_' << i O << PrivateGlobalPrefix << "CPI" << FunctionNumber << '_' << i
<< ":\t\t\t\t\t;" << *CP[i] << '\n'; << ":\t\t\t\t\t;" << *CP[i] << '\n';
emitGlobalConstant(CP[i]); EmitGlobalConstant(CP[i]);
} }
} }
@ -677,7 +677,7 @@ bool AIXAsmPrinter::doInitialization(Module &M) {
O << "\t.csect _global.rw_c[RW],3\n"; O << "\t.csect _global.rw_c[RW],3\n";
} }
O << Name << ":\n"; O << Name << ":\n";
emitGlobalConstant(C); EmitGlobalConstant(C);
} }
// Output labels for globals // Output labels for globals

View File

@ -25,7 +25,7 @@ using namespace x86;
/// method to print assembly for each instruction. /// method to print assembly for each instruction.
/// ///
bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
setupMachineFunction(MF); SetupMachineFunction(MF);
O << "\n\n"; O << "\n\n";
// Print out constants referenced by the function // Print out constants referenced by the function
@ -33,7 +33,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function. // Print out labels for the function.
SwitchSection("\t.text\n", MF.getFunction()); SwitchSection("\t.text\n", MF.getFunction());
emitAlignment(4); // FIXME: This should be parameterized somewhere. EmitAlignment(4); // FIXME: This should be parameterized somewhere.
O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.globl\t" << CurrentFnName << "\n";
if (!forCygwin && !forDarwin) if (!forCygwin && !forDarwin)
O << "\t.type\t" << CurrentFnName << ", @function\n"; O << "\t.type\t" << CurrentFnName << ", @function\n";

View File

@ -90,12 +90,12 @@ void X86SharedAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
// FIXME: force doubles to be naturally aligned. We should handle this // FIXME: force doubles to be naturally aligned. We should handle this
// more correctly in the future. // more correctly in the future.
if (CP[i]->getType() == Type::DoubleTy) if (CP[i]->getType() == Type::DoubleTy)
emitAlignment(3); EmitAlignment(3);
else else
emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); EmitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i
<< ":\t\t\t\t\t" << CommentString << *CP[i] << "\n"; << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
emitGlobalConstant(CP[i]); EmitGlobalConstant(CP[i]);
} }
} }
@ -149,7 +149,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
break; break;
} }
emitAlignment(Align); EmitAlignment(Align);
if (!forCygwin && !forDarwin) { if (!forCygwin && !forDarwin) {
O << "\t.type " << name << ",@object\n"; O << "\t.type " << name << ",@object\n";
O << "\t.size " << name << "," << Size << "\n"; O << "\t.size " << name << "," << Size << "\n";
@ -159,7 +159,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
O << " = "; O << " = ";
WriteAsOperand(O, C, false, false, &M); WriteAsOperand(O, C, false, false, &M);
O << "\n"; O << "\n";
emitGlobalConstant(C); EmitGlobalConstant(C);
} }
} }

View File

@ -25,7 +25,7 @@ using namespace x86;
/// method to print assembly for each instruction. /// method to print assembly for each instruction.
/// ///
bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) { bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
setupMachineFunction(MF); SetupMachineFunction(MF);
O << "\n\n"; O << "\n\n";
// Print out constants referenced by the function // Print out constants referenced by the function
@ -33,7 +33,7 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function. // Print out labels for the function.
SwitchSection("\t.text\n", MF.getFunction()); SwitchSection("\t.text\n", MF.getFunction());
emitAlignment(4); EmitAlignment(4);
O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.globl\t" << CurrentFnName << "\n";
if (!forCygwin && !forDarwin) if (!forCygwin && !forDarwin)
O << "\t.type\t" << CurrentFnName << ", @function\n"; O << "\t.type\t" << CurrentFnName << ", @function\n";