[LLVMbugs] [Bug 3985] New: x86 and x86-64 don't implement the local dynamic TLS mode.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Apr 14 02:08:12 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=3985
Summary: x86 and x86-64 don't implement the local dynamic TLS
mode.
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: lli
AssignedTo: rafael.espindola at gmail.com
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu
gcc with -fPIC on x86-64 compiles
static int __thread a;
static int __thread b;
int f(void)
{
return a + b;
}
to
leaq b at TLSLD(%rip), %rdi
call __tls_get_addr at PLT
movq %rax, %rdx
movl b at DTPOFF(%rax), %eax
addl a at DTPOFF(%rdx), %eax
ret
and on X86 to
pushl %esi
pushl %ebx
call ___i686.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
leal b at TLSLDM(%ebx), %eax
call ___tls_get_addr at PLT
movl %eax, %esi
movl b at DTPOFF(%eax), %eax
addl a at DTPOFF(%esi), %eax
popl %ebx
popl %esi
ret
note that there is only one call to ___tls_get_addr. We should implement that
on llvm.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list