summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/MCTargetDesc
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-06-01 16:27:21 +0000
committerHans Wennborg <hans@hanshq.net>2012-06-01 16:27:21 +0000
commit789acfb63d66b724c431bea498a89ebe61c33bc0 (patch)
treea996b2a733d8ff873bb3c3eb3b406c4f201d2218 /llvm/lib/Target/X86/MCTargetDesc
parentdc191a184f5b5d1bc9b003166eea610511801806 (diff)
downloadbcm5719-llvm-789acfb63d66b724c431bea498a89ebe61c33bc0.tar.gz
bcm5719-llvm-789acfb63d66b724c431bea498a89ebe61c33bc0.zip
Implement the local-dynamic TLS model for x86 (PR3985)
This implements codegen support for accesses to thread-local variables using the local-dynamic model, and adds a clean-up pass so that the base address for the TLS block can be re-used between local-dynamic access on an execution path. llvm-svn: 157818
Diffstat (limited to 'llvm/lib/Target/X86/MCTargetDesc')
-rw-r--r--llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h b/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
index 0c7f14d01cc..f1712402d6a 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
@@ -100,6 +100,26 @@ namespace X86II {
/// SYMBOL_LABEL @TLSGD
MO_TLSGD,
+ /// MO_TLSLD - On a symbol operand this indicates that the immediate is
+ /// the offset of the GOT entry with the TLS index for the module that
+ /// contains the symbol. When this index is passed to a call to to
+ /// __tls_get_addr, the function will return the base address of the TLS
+ /// block for the symbol.
+ ///
+ /// See 'ELF Handling for Thread-Local Storage' for more details.
+ /// SYMBOL_LABEL @TLSLD
+ MO_TLSLD,
+
+ /// MO_TLSLDM - On a symbol operand this indicates that the immediate is
+ /// the offset of the GOT entry with the TLS index for the module that
+ /// contains the symbol. When this index is passed to a call to to
+ /// ___tls_get_addr, the function will return the base address of the TLS
+ /// block for the symbol.
+ ///
+ /// See 'ELF Handling for Thread-Local Storage' for more details.
+ /// SYMBOL_LABEL @TLSLDM
+ MO_TLSLDM,
+
/// MO_GOTTPOFF - On a symbol operand this indicates that the immediate is
/// some TLS offset.
///
@@ -121,6 +141,13 @@ namespace X86II {
/// SYMBOL_LABEL @TPOFF
MO_TPOFF,
+ /// MO_DTPOFF - On a symbol operand this indicates that the immediate is
+ /// the offset of the GOT entry with the TLS offset of the symbol.
+ ///
+ /// See 'ELF Handling for Thread-Local Storage' for more details.
+ /// SYMBOL_LABEL @DTPOFF
+ MO_DTPOFF,
+
/// MO_NTPOFF - On a symbol operand this indicates that the immediate is
/// some TLS offset.
///
OpenPOWER on IntegriCloud