[llvm-branch-commits] [llvm-branch] r104342 - in /llvm/branches/Apple/whitney: include/llvm/MC/MCAsmInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/MC/MCAsmInfo.cpp lib/MC/MCAsmInfoDarwin.cpp
Daniel Dunbar
daniel at zuster.org
Fri May 21 12:06:02 PDT 2010
Author: ddunbar
Date: Fri May 21 14:06:02 2010
New Revision: 104342
URL: http://llvm.org/viewvc/llvm-project?rev=104342&view=rev
Log:
Partial code for emitting thread local bss data.
Modified:
llvm/branches/Apple/whitney/include/llvm/MC/MCAsmInfo.h
llvm/branches/Apple/whitney/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/branches/Apple/whitney/lib/MC/MCAsmInfo.cpp
llvm/branches/Apple/whitney/lib/MC/MCAsmInfoDarwin.cpp
Modified: llvm/branches/Apple/whitney/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/include/llvm/MC/MCAsmInfo.h?rev=104342&r1=104341&r2=104342&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/branches/Apple/whitney/include/llvm/MC/MCAsmInfo.h Fri May 21 14:06:02 2010
@@ -303,6 +303,7 @@
// Accessors.
//
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
+ bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
bool hasStaticCtorDtorReferenceInStaticMode() const {
return HasStaticCtorDtorReferenceInStaticMode;
}
Modified: llvm/branches/Apple/whitney/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=104342&r1=104341&r2=104342&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/branches/Apple/whitney/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri May 21 14:06:02 2010
@@ -310,6 +310,13 @@
OutStreamer.EmitZerofill(TheSection, GVSym, Size, 1 << AlignLog);
return;
}
+
+ // Handle the tbss directive on darwin which is a thread local bss directive
+ // like zerofill.
+ if (GVKind.isThreadBSS() && MAI->hasMachoTBSSDirective()) {
+ OutStreamer.EmitTBSSSymbol(TheSection, GVSym, Size, 1 << AlignLog);
+ return;
+ }
OutStreamer.SwitchSection(TheSection);
Modified: llvm/branches/Apple/whitney/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/MC/MCAsmInfo.cpp?rev=104342&r1=104341&r2=104342&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/branches/Apple/whitney/lib/MC/MCAsmInfo.cpp Fri May 21 14:06:02 2010
@@ -21,6 +21,7 @@
MCAsmInfo::MCAsmInfo() {
HasSubsectionsViaSymbols = false;
HasMachoZeroFillDirective = false;
+ HasMachoTBSSDirective = false;
HasStaticCtorDtorReferenceInStaticMode = false;
MaxInstLength = 4;
PCSymbol = "$";
Modified: llvm/branches/Apple/whitney/lib/MC/MCAsmInfoDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/MC/MCAsmInfoDarwin.cpp?rev=104342&r1=104341&r2=104342&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/MC/MCAsmInfoDarwin.cpp (original)
+++ llvm/branches/Apple/whitney/lib/MC/MCAsmInfoDarwin.cpp Fri May 21 14:06:02 2010
@@ -35,6 +35,7 @@
WeakRefDirective = "\t.weak_reference ";
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
HasMachoZeroFillDirective = true; // Uses .zerofill
+ HasMachoTBSSDirective = true; // Uses .tbss
HasStaticCtorDtorReferenceInStaticMode = true;
HiddenVisibilityAttr = MCSA_PrivateExtern;
More information about the llvm-branch-commits
mailing list