summaryrefslogtreecommitdiffstats
path: root/lib/Target/Blackfin
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-19 05:38:33 +0000
committerChris Lattner <sabre@nondot.org>2010-01-19 05:38:33 +0000
commit74bfe21b50c14c15f55ce3bd5857d65b588fae3c (patch)
treec9ed84b63b3072bc2f9f9a79b3b18222e8dddf94 /lib/Target/Blackfin
parent074f837bbb6e21f8df290af60fe226dfaf3bdf35 (diff)
downloadexternal_llvm-74bfe21b50c14c15f55ce3bd5857d65b588fae3c.zip
external_llvm-74bfe21b50c14c15f55ce3bd5857d65b588fae3c.tar.gz
external_llvm-74bfe21b50c14c15f55ce3bd5857d65b588fae3c.tar.bz2
Now that we have everything nicely factored (e.g. asmprinter is not
doing global variable classification anymore) and hookized, sink almost all target targets global variable emission code into AsmPrinter and out of each target. Some notes: 1. PIC16 does completely custom and crazy stuff, so it is not changed. 2. XCore has some custom handling for extra directives. I'll look at it next. 3. This switches linux/ppc to use .globl instead of .global. If .globl is actually wrong, let me know and I'll fix it. 4. This makes linux/ppc get a lot of random cases right which were obviously wrong before, it is probably now a bit healthier. 5. Blackfin will probably start getting .comm and other things that it didn't before. If this is undesirable, it should explicitly opt out of these things by clearing the relevant fields of MCAsmInfo. This leads to a nice diffstat: 14 files changed, 127 insertions(+), 830 deletions(-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Blackfin')
-rw-r--r--lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp b/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
index 8afa650..749f735 100644
--- a/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
+++ b/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
@@ -60,7 +60,6 @@ namespace {
unsigned AsmVariant, const char *ExtraCode);
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
unsigned AsmVariant, const char *ExtraCode);
- void PrintGlobalVariable(const GlobalVariable* GVar);
};
} // end of anonymous namespace
@@ -91,28 +90,6 @@ void BlackfinAsmPrinter::emitLinkage(const MCSymbol *GVSym,
}
}
-void BlackfinAsmPrinter::PrintGlobalVariable(const GlobalVariable* GV) {
- const TargetData *TD = TM.getTargetData();
-
- if (!GV->hasInitializer() || EmitSpecialLLVMGlobal(GV))
- return;
-
- MCSymbol *GVSym = GetGlobalValueSymbol(GV);
- Constant *C = GV->getInitializer();
-
- OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GV, Mang,
- TM));
- emitLinkage(GVSym, GV->getLinkage());
- EmitAlignment(TD->getPreferredAlignmentLog(GV), GV);
- printVisibility(GVSym, GV->getVisibility());
-
- O << "\t.type " << *GVSym << ", STT_OBJECT\n";
- O << "\t.size " << *GVSym << "\n";
- O << ',' << TD->getTypeAllocSize(C->getType()) << '\n';
- O << *GVSym << ":\n";
- EmitGlobalConstant(C);
-}
-
/// runOnMachineFunction - This uses the printInstruction()
/// method to print assembly for each instruction.
///