diff options
author | Dale Johannesen <dalej@apple.com> | 2008-01-11 00:54:37 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-01-11 00:54:37 +0000 |
commit | 3c78832aaa55edeeae23d00955a969bbe024c9a6 (patch) | |
tree | b1588eeb3c259f4bc53f775211f177faf5661541 /lib/Target/PowerPC | |
parent | ea3a181a56ccc992e3ae5ec99ee1fd8fcd89f0cf (diff) | |
download | external_llvm-3c78832aaa55edeeae23d00955a969bbe024c9a6.zip external_llvm-3c78832aaa55edeeae23d00955a969bbe024c9a6.tar.gz external_llvm-3c78832aaa55edeeae23d00955a969bbe024c9a6.tar.bz2 |
Weak things initialized to 0 don't go in bss on Darwin.
Cosmetic changes to spacing to match gcc (some dejagnu
tests actually care).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 17 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 2 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 5deb41b..fb84181 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -767,7 +767,7 @@ std::string DarwinAsmPrinter::getSectionForFunction(const Function &F) const { case Function::InternalLinkage: return TAI->getTextSection(); case Function::WeakLinkage: case Function::LinkOnceLinkage: - return ".section __TEXT,__textcoal_nt,coalesced,pure_instructions"; + return "\t.section __TEXT,__textcoal_nt,coalesced,pure_instructions"; } } @@ -869,13 +869,13 @@ bool DarwinAsmPrinter::doInitialization(Module &M) { // Prime text sections so they are adjacent. This reduces the likelihood a // large data or debug section causes a branch to exceed 16M limit. - SwitchToTextSection(".section __TEXT,__textcoal_nt,coalesced," + SwitchToTextSection("\t.section __TEXT,__textcoal_nt,coalesced," "pure_instructions"); if (TM.getRelocationModel() == Reloc::PIC_) { - SwitchToTextSection(".section __TEXT,__picsymbolstub1,symbol_stubs," + SwitchToTextSection("\t.section __TEXT,__picsymbolstub1,symbol_stubs," "pure_instructions,32"); } else if (TM.getRelocationModel() == Reloc::DynamicNoPIC) { - SwitchToTextSection(".section __TEXT,__symbol_stub1,symbol_stubs," + SwitchToTextSection("\t.section __TEXT,__symbol_stub1,symbol_stubs," "pure_instructions,16"); } SwitchToTextSection(TAI->getTextSection()); @@ -917,8 +917,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { if (C->isNullValue() && /* FIXME: Verify correct */ !I->hasSection() && - (I->hasInternalLinkage() || I->hasWeakLinkage() || - I->hasLinkOnceLinkage() || I->hasExternalLinkage())) { + (I->hasInternalLinkage() || I->hasExternalLinkage())) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (I->hasExternalLinkage()) { O << "\t.globl " << name << '\n'; @@ -941,7 +940,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { case GlobalValue::WeakLinkage: O << "\t.globl " << name << '\n' << "\t.weak_definition " << name << '\n'; - SwitchToDataSection(".section __DATA,__datacoal_nt,coalesced", I); + SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I); break; case GlobalValue::AppendingLinkage: // FIXME: appending linkage variables should go into a section of @@ -1008,7 +1007,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { if (TM.getRelocationModel() == Reloc::PIC_) { for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end(); i != e; ++i) { - SwitchToTextSection(".section __TEXT,__picsymbolstub1,symbol_stubs," + SwitchToTextSection("\t.section __TEXT,__picsymbolstub1,symbol_stubs," "pure_instructions,32"); EmitAlignment(4); O << "L" << *i << "$stub:\n"; @@ -1036,7 +1035,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { } else { for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end(); i != e; ++i) { - SwitchToTextSection(".section __TEXT,__symbol_stub1,symbol_stubs," + SwitchToTextSection("\t.section __TEXT,__symbol_stub1,symbol_stubs," "pure_instructions,16"); EmitAlignment(4); O << "L" << *i << "$stub:\n"; diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 0cb2fe4..e593482 100644 --- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -53,7 +53,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) UsedDirective = "\t.no_dead_strip\t"; WeakDefDirective = "\t.weak_definition "; WeakRefDirective = "\t.weak_reference "; - HiddenDirective = "\t.private_extern\t"; + HiddenDirective = "\t.private_extern "; SupportsExceptionHandling = true; NeedsIndirectEncoding = true; NeedsSet = true; |