1
- ; RUN: llc < %s -mtriple=i386-linux-musl -relocation-model=pic -relax-elf-relocations=true | FileCheck --check-prefixes=CHECK,X86 %s
2
- ; RUN: llc < %s -mtriple=x86_64-linux-musl -relocation-model=pic -relax-elf-relocations=true | FileCheck --check-prefixes=CHECK,X64 %s
3
-
4
- ;; If GOTPCRELX is disabled, don't use GOT for __tls_get_addr to work around
5
- ;; a ld.bfd bug (binutils PR24784).
6
- ; RUN: llc < %s -mtriple=i386-linux-musl -relocation-model=pic | FileCheck --check-prefixes=CHECK,X86-PLT %s
7
- ; RUN: llc < %s -mtriple=x86_64-linux-musl -relocation-model=pic | FileCheck --check-prefixes=CHECK,X64-PLT %s
1
+ ; RUN: llc < %s -mtriple=i386-linux-musl -relocation-model=pic | FileCheck --check-prefixes=CHECK,X86 %s
2
+ ; RUN: llc < %s -mtriple=x86_64-linux-musl -relocation-model=pic | FileCheck --check-prefixes=CHECK,X64 %s
8
3
9
4
@gd = thread_local global i32 0
10
5
@ld = internal thread_local global i32 0
14
9
; CHECK-LABEL: get_gd:
15
10
; X86: leal gd@TLSGD(%ebx), %eax
16
11
; X86: calll *___tls_get_addr@GOT(%ebx)
17
- ; X86-PLT: calll ___tls_get_addr@PLT
18
12
19
13
; X64: leaq gd@TLSGD(%rip), %rdi
20
14
; X64: callq *__tls_get_addr@GOTPCREL(%rip)
21
- ; X64-PLT: callq __tls_get_addr@PLT
22
15
ret ptr @gd
23
16
}
24
17
@@ -27,11 +20,9 @@ define ptr @get_ld() {
27
20
; CHECK-LABEL: get_ld:
28
21
; X86: leal ld@TLSLDM(%ebx), %eax
29
22
; X86: calll *___tls_get_addr@GOT(%ebx)
30
- ; X86-PLT: calll ___tls_get_addr@PLT
31
23
32
24
; X64: leaq ld@TLSLD(%rip), %rdi
33
25
; X64: callq *__tls_get_addr@GOTPCREL(%rip)
34
- ; X64-PLT: callq __tls_get_addr@PLT
35
26
ret ptr @ld
36
27
}
37
28
0 commit comments