diff options
| author | Eric Christopher <echristo@apple.com> | 2010-05-20 00:49:07 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2010-05-20 00:49:07 +0000 |
| commit | 2d4ea3e6925c65e2a182ea83c3e7d1aab11cc0da (patch) | |
| tree | 16e95fc9ae7c59a7e3d084d60a1bd538eae6e783 /lib | |
| parent | 9385d42e55e2ce59e285bb7b45718408eb5c938d (diff) | |
| download | external_llvm-2d4ea3e6925c65e2a182ea83c3e7d1aab11cc0da.zip external_llvm-2d4ea3e6925c65e2a182ea83c3e7d1aab11cc0da.tar.gz external_llvm-2d4ea3e6925c65e2a182ea83c3e7d1aab11cc0da.tar.bz2 | |
Partial code for emitting thread local bss data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 | ||||
| -rw-r--r-- | lib/MC/MCAsmInfo.cpp | 1 | ||||
| -rw-r--r-- | lib/MC/MCAsmInfoDarwin.cpp | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index bd7d0e5..50a5075 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -310,6 +310,13 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { 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); diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp index 2b23994..a275be2 100644 --- a/lib/MC/MCAsmInfo.cpp +++ b/lib/MC/MCAsmInfo.cpp @@ -21,6 +21,7 @@ using namespace llvm; MCAsmInfo::MCAsmInfo() { HasSubsectionsViaSymbols = false; HasMachoZeroFillDirective = false; + HasMachoTBSSDirective = false; HasStaticCtorDtorReferenceInStaticMode = false; MaxInstLength = 4; PCSymbol = "$"; diff --git a/lib/MC/MCAsmInfoDarwin.cpp b/lib/MC/MCAsmInfoDarwin.cpp index 3c31caa..0bd3b2d 100644 --- a/lib/MC/MCAsmInfoDarwin.cpp +++ b/lib/MC/MCAsmInfoDarwin.cpp @@ -35,6 +35,7 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() { 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; |
