1 ; RUN: llc < %s -emulated-tls -mtriple=i686-linux-android -relocation-model=pic | FileCheck %s
2 ; RUN: llc < %s -emulated-tls -mtriple=x86_64-linux-android -relocation-model=pic | FileCheck -check-prefix=X64 %s
4 ; RUN: llc < %s -mtriple=i686-linux-android -relocation-model=pic | FileCheck %s
5 ; RUN: llc < %s -mtriple=x86_64-linux-android -relocation-model=pic | FileCheck -check-prefix=X64 %s
7 ; Make sure that TLS symboles are emitted in expected order.
9 @external_x = external thread_local global i32
10 @external_y = thread_local global i32 7
11 @internal_y = internal thread_local global i32 9
13 define ptr @get_external_x() {
18 define ptr @get_external_y() {
23 define ptr @get_internal_y() {
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 32-bit mode
29 ; CHECK-LABEL: get_external_x:
30 ; CHECK: __emutls_v.external_x
31 ; CHECK: __emutls_get_address
33 ; CHECK-LABEL: get_external_y:
34 ; CHECK: __emutls_v.external_y
35 ; CHECK: __emutls_get_address
37 ; CHECK-LABEL: get_internal_y:
38 ; CHECK: __emutls_v.internal_y
39 ; CHECK: __emutls_get_address
41 ; CHECK-NOT: __emutls_v.external_x:
44 ; CHECK-LABEL: __emutls_v.external_y:
48 ; CHECK-NEXT: .long __emutls_t.external_y
49 ; CHECK-LABEL: __emutls_t.external_y:
53 ; CHECK-LABEL: __emutls_v.internal_y:
57 ; CHECK-NEXT: .long __emutls_t.internal_y
58 ; CHECK-LABEL: __emutls_t.internal_y:
61 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 64-bit mode
62 ; X64-LABEL: get_external_x:
63 ; X64: __emutls_v.external_x
64 ; X64: __emutls_get_address
66 ; X64-LABEL: get_external_y:
67 ; X64: __emutls_v.external_y
68 ; X64: __emutls_get_address
70 ; X64-LABEL: get_internal_y:
71 ; X64: __emutls_v.internal_y
72 ; X64: __emutls_get_address
74 ; X64-NOT: __emutls_v.external_x:
77 ; X64-LABEL: __emutls_v.external_y:
81 ; X64-NEXT: .quad __emutls_t.external_y
82 ; X64-LABEL: __emutls_t.external_y:
86 ; X64-LABEL: __emutls_v.internal_y:
90 ; X64-NEXT: .quad __emutls_t.internal_y
91 ; X64-LABEL: __emutls_t.internal_y: