[PATCH] D16474: Use PC-relative address for x32 TLS address
H.J Lu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 13:07:28 PST 2016
hjl.tools added a comment.
Since llvm doesn't support TLS for x32:
[hjl at gnu-mic-2 X86]$ cat x32-tls-1.ll
@x = thread_local global i32 0, align 4
define i32* @get_x() {
entry:
ret i32* @x
}
[hjl at gnu-mic-2 X86]$ /export/build/gnu/llvm-clang/build-x86_64-linux/bin/llc -relocation-model=pic -mtriple=x86_64-linux-gnux32 < x32-tls-1.ll
.text
.file "<stdin>"
LLVM ERROR: Cannot select: 0x29507a0: ch,glue = X86ISD::TLSADDR 0x28fc140, TargetGlobalTLSAddress:i32<i32* @x> 0 [TF=7]
0x2950670: i32 = TargetGlobalTLSAddress<i32* @x> 0 [TF=7]
In function: get_x
[hjl at gnu-mic-2 X86]$
I don't know how to create a test for this change.
http://reviews.llvm.org/D16474
More information about the llvm-commits
mailing list