aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-21 17:39:48 +0000
committerChris Lattner <sabre@nondot.org>2009-07-21 17:39:48 +0000
commitb34e3a9b6be179190da4f469f2d563ab1d29f73d (patch)
treed1d4a0ae0a69511861640901eea025fbbfbbf97c /lib/Target/Mips
parentd3ffc0617402f3111f55bbb86d2fb121669fe680 (diff)
downloadexternal_llvm-b34e3a9b6be179190da4f469f2d563ab1d29f73d.zip
external_llvm-b34e3a9b6be179190da4f469f2d563ab1d29f73d.tar.gz
external_llvm-b34e3a9b6be179190da4f469f2d563ab1d29f73d.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76593 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
index 383ba8f..fb338ec 100644
--- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
+++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
@@ -411,8 +411,7 @@ printOperand(const MachineInstr *MI, int opNum)
}
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 @@ printUnsignedImm(const MachineInstr *MI, int opNum)
}
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 @@ printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier)
}
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 @@ doInitialization(Module &M)
// 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())