diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-20 21:38:10 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-20 21:38:10 +0000 |
commit | b3a0417cad8b625acc3033bd5e24afb9ffd0b084 (patch) | |
tree | c691c028e9aa107d0cd0b091af7858a7f040b445 /lib/Target/X86/X86AsmPrinter.cpp | |
parent | e3e31c22bf7ebed9e8e00ede4f4aa87ce2225528 (diff) | |
download | llvm-b3a0417cad8b625acc3033bd5e24afb9ffd0b084.tar.gz llvm-b3a0417cad8b625acc3033bd5e24afb9ffd0b084.tar.bz2 llvm-b3a0417cad8b625acc3033bd5e24afb9ffd0b084.tar.xz |
Implement "general dynamic", "initial exec" and "local exec" TLS models for
X86 32 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86AsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index bc103d70f1..76037f13bd 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -171,7 +171,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { } } - if (!I->hasSection() && + if (!I->hasSection() && !I->isThreadLocal() && (I->hasInternalLinkage() || I->hasWeakLinkage() || I->hasLinkOnceLinkage())) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. @@ -256,9 +256,13 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { SwitchToDataSection(SectionName.c_str()); } else { if (C->isNullValue() && !NoZerosInBSS && TAI->getBSSSection()) - SwitchToDataSection(TAI->getBSSSection(), I); + SwitchToDataSection(I->isThreadLocal() ? TAI->getTLSBSSSection() : + TAI->getBSSSection(), I); else if (!I->isConstant()) - SwitchToDataSection(TAI->getDataSection(), I); + SwitchToDataSection(I->isThreadLocal() ? TAI->getTLSDataSection() : + TAI->getDataSection(), I); + else if (I->isThreadLocal()) + SwitchToDataSection(TAI->getTLSDataSection()); else { // Read-only data. bool HasReloc = C->ContainsRelocations(); |