[llvm-commits] [llvm] r76593 - /llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Tue Jul 21 10:39:55 PDT 2009
Author: lattner
Date: Tue Jul 21 12:39:48 2009
New Revision: 76593
URL: http://llvm.org/viewvc/llvm-project?rev=76593&view=rev
Log:
whitespace cleanups, make the MipsAsmPrinter::doInitialization
chain to the super class instead of initializing mangler directly.
This gives it .file and module level inline asm support among other
things.
Modified:
llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=76593&r1=76592&r2=76593&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Tue Jul 21 12:39:48 2009
@@ -411,8 +411,7 @@
}
void MipsAsmPrinter::
-printUnsignedImm(const MachineInstr *MI, int opNum)
-{
+printUnsignedImm(const MachineInstr *MI, int opNum) {
const MachineOperand &MO = MI->getOperand(opNum);
if (MO.getType() == MachineOperand::MO_Immediate)
O << (unsigned short int)MO.getImm();
@@ -421,8 +420,7 @@
}
void MipsAsmPrinter::
-printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier)
-{
+printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier) {
// when using stack locations for not load/store instructions
// print the same way as all normal 3 operand instructions.
if (Modifier && !strcmp(Modifier, "stackloc")) {
@@ -442,18 +440,14 @@
}
void MipsAsmPrinter::
-printFCCOperand(const MachineInstr *MI, int opNum, const char *Modifier)
-{
+printFCCOperand(const MachineInstr *MI, int opNum, const char *Modifier) {
const MachineOperand& MO = MI->getOperand(opNum);
O << Mips::MipsFCCToString((Mips::CondCode)MO.getImm());
}
-bool MipsAsmPrinter::
-doInitialization(Module &M)
-{
- Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
- TAI->getLinkerPrivateGlobalPrefix());
-
+bool MipsAsmPrinter::doInitialization(Module &M) {
+ // FIXME: Use SwitchToDataSection.
+
// Tell the assembler which ABI we are using
O << "\t.section .mdebug." << emitCurrentABIString() << '\n';
@@ -465,11 +459,11 @@
// return to previous section
O << "\t.previous" << '\n';
- return false; // success
+ return AsmPrinter::doInitialization(M);
}
void MipsAsmPrinter::
-printModuleLevelGV(const GlobalVariable* GVar) {
+printModuleLevelGV(const GlobalVariable *GVar) {
const TargetData *TD = TM.getTargetData();
if (!GVar->hasInitializer())
More information about the llvm-commits
mailing list