86 changes: 43 additions & 43 deletions llvm/test/CodeGen/X86/byval5.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-linux -mattr=-avx | FileCheck %s -check-prefix=X64
; Win64 has not supported byval yet.
; RUN: llc < %s -mtriple=i686-- -mattr=-avx | FileCheck %s -check-prefix=X32
; RUN: llc < %s -mtriple=i686-- -mattr=-avx | FileCheck %s -check-prefix=X86

%struct.s = type { i8, i8, i8, i8, i8, i8, i8, i8,
i8, i8, i8, i8, i8, i8, i8, i8,
Expand Down Expand Up @@ -52,48 +52,48 @@ define void @g(i8 signext %a1, i8 signext %a2, i8 signext %a3, i8 signext %a
; X64-NEXT: popq %rbx
; X64-NEXT: retq
;
; X32-LABEL: g:
; X32: # %bb.0: # %entry
; X32-NEXT: pushl %ebp
; X32-NEXT: movl %esp, %ebp
; X32-NEXT: pushl %ebx
; X32-NEXT: pushl %edi
; X32-NEXT: pushl %esi
; X32-NEXT: andl $-8, %esp
; X32-NEXT: subl $272, %esp # imm = 0x110
; X32-NEXT: movb 28(%ebp), %al
; X32-NEXT: movb 24(%ebp), %cl
; X32-NEXT: movb 20(%ebp), %dl
; X32-NEXT: movb 16(%ebp), %ah
; X32-NEXT: movb 12(%ebp), %ch
; X32-NEXT: movb 8(%ebp), %dh
; X32-NEXT: movb %dh, {{[0-9]+}}(%esp)
; X32-NEXT: movb %ch, {{[0-9]+}}(%esp)
; X32-NEXT: movb %ah, {{[0-9]+}}(%esp)
; X32-NEXT: movb %dl, {{[0-9]+}}(%esp)
; X32-NEXT: movb %cl, {{[0-9]+}}(%esp)
; X32-NEXT: movb %al, {{[0-9]+}}(%esp)
; X32-NEXT: leal {{[0-9]+}}(%esp), %ebx
; X32-NEXT: movl $32, %ecx
; X32-NEXT: movl %esp, %edi
; X32-NEXT: movl %ebx, %esi
; X32-NEXT: rep;movsl (%esi), %es:(%edi)
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
; X32-NEXT: movb %al, {{[0-9]+}}(%esp)
; X32-NEXT: calll f
; X32-NEXT: movl $32, %ecx
; X32-NEXT: movl %esp, %edi
; X32-NEXT: movl %ebx, %esi
; X32-NEXT: rep;movsl (%esi), %es:(%edi)
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
; X32-NEXT: movb %al, {{[0-9]+}}(%esp)
; X32-NEXT: calll f
; X32-NEXT: leal -12(%ebp), %esp
; X32-NEXT: popl %esi
; X32-NEXT: popl %edi
; X32-NEXT: popl %ebx
; X32-NEXT: popl %ebp
; X32-NEXT: retl
; X86-LABEL: g:
; X86: # %bb.0: # %entry
; X86-NEXT: pushl %ebp
; X86-NEXT: movl %esp, %ebp
; X86-NEXT: pushl %ebx
; X86-NEXT: pushl %edi
; X86-NEXT: pushl %esi
; X86-NEXT: andl $-8, %esp
; X86-NEXT: subl $272, %esp # imm = 0x110
; X86-NEXT: movb 28(%ebp), %al
; X86-NEXT: movb 24(%ebp), %cl
; X86-NEXT: movb 20(%ebp), %dl
; X86-NEXT: movb 16(%ebp), %ah
; X86-NEXT: movb 12(%ebp), %ch
; X86-NEXT: movb 8(%ebp), %dh
; X86-NEXT: movb %dh, {{[0-9]+}}(%esp)
; X86-NEXT: movb %ch, {{[0-9]+}}(%esp)
; X86-NEXT: movb %ah, {{[0-9]+}}(%esp)
; X86-NEXT: movb %dl, {{[0-9]+}}(%esp)
; X86-NEXT: movb %cl, {{[0-9]+}}(%esp)
; X86-NEXT: movb %al, {{[0-9]+}}(%esp)
; X86-NEXT: leal {{[0-9]+}}(%esp), %ebx
; X86-NEXT: movl $32, %ecx
; X86-NEXT: movl %esp, %edi
; X86-NEXT: movl %ebx, %esi
; X86-NEXT: rep;movsl (%esi), %es:(%edi)
; X86-NEXT: movb {{[0-9]+}}(%esp), %al
; X86-NEXT: movb %al, {{[0-9]+}}(%esp)
; X86-NEXT: calll f
; X86-NEXT: movl $32, %ecx
; X86-NEXT: movl %esp, %edi
; X86-NEXT: movl %ebx, %esi
; X86-NEXT: rep;movsl (%esi), %es:(%edi)
; X86-NEXT: movb {{[0-9]+}}(%esp), %al
; X86-NEXT: movb %al, {{[0-9]+}}(%esp)
; X86-NEXT: calll f
; X86-NEXT: leal -12(%ebp), %esp
; X86-NEXT: popl %esi
; X86-NEXT: popl %edi
; X86-NEXT: popl %ebx
; X86-NEXT: popl %ebp
; X86-NEXT: retl
entry:
%a = alloca %struct.s
%tmp = getelementptr %struct.s, %struct.s* %a, i32 0, i32 0
Expand Down
114 changes: 57 additions & 57 deletions llvm/test/CodeGen/X86/emutls-pic.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-gnu -relocation-model=pic | FileCheck -check-prefix=X32 %s
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-gnu -relocation-model=pic | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -emulated-tls -mtriple=x86_64-linux-gnu -relocation-model=pic | FileCheck -check-prefix=X64 %s
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-android -relocation-model=pic | FileCheck -check-prefix=X32 %s
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-android -relocation-model=pic | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -emulated-tls -mtriple=x86_64-linux-android -relocation-model=pic | FileCheck -check-prefix=X64 %s

; RUN: llc < %s -mtriple=i386-linux-gnu -relocation-model=pic | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mtriple=x86_64-linux-gnu -relocation-model=pic | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mtriple=i386-linux-android -relocation-model=pic | FileCheck -check-prefix=X32 %s
; RUN: llc < %s -mtriple=i386-linux-android -relocation-model=pic | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -mtriple=x86_64-linux-android -relocation-model=pic | FileCheck -check-prefix=X64 %s

; NoEMU-NOT: __emutls
Expand All @@ -15,10 +15,10 @@
declare i8* @my_emutls_get_address(i8*)

define i32 @my_get_xyz() {
; X32-LABEL: my_get_xyz:
; X32: movl my_emutls_v_xyz@GOT(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll my_emutls_get_address@PLT
; X86-LABEL: my_get_xyz:
; X86: movl my_emutls_v_xyz@GOT(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll my_emutls_get_address@PLT
; X64-LABEL: my_get_xyz:
; X64: movq my_emutls_v_xyz@GOTPCREL(%rip), %rdi
; X64-NEXT: callq my_emutls_get_address@PLT
Expand All @@ -41,10 +41,10 @@ entry:
ret i32 %tmp1
}

; X32-LABEL: f1:
; X32: movl __emutls_v.i@GOT(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll __emutls_get_address@PLT
; X86-LABEL: f1:
; X86: movl __emutls_v.i@GOT(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll __emutls_get_address@PLT
; X64-LABEL: f1:
; X64: movq __emutls_v.i@GOTPCREL(%rip), %rdi
; X64-NEXT: callq __emutls_get_address@PLT
Expand All @@ -57,7 +57,7 @@ entry:
ret i32* @i
}

; X32-LABEL: f2:
; X86-LABEL: f2:
; X64-LABEL: f2:


Expand All @@ -67,7 +67,7 @@ entry:
ret i32 %tmp1
}

; X32-LABEL: f3:
; X86-LABEL: f3:
; X64-LABEL: f3:


Expand All @@ -76,7 +76,7 @@ entry:
ret i32* @i
}

; X32-LABEL: f4:
; X86-LABEL: f4:
; X64-LABEL: f4:


Expand All @@ -88,16 +88,16 @@ entry:
ret i32 %add
}

; X32-LABEL: f5:
; X32: leal __emutls_v.j@GOTOFF(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll __emutls_get_address@PLT
; X32-NEXT: movl (%eax), %esi
; X32-NEXT: leal __emutls_v.k@GOTOFF(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll __emutls_get_address@PLT
; X32-NEXT: addl (%eax), %esi
; X32-NEXT: movl %esi, %eax
; X86-LABEL: f5:
; X86: leal __emutls_v.j@GOTOFF(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll __emutls_get_address@PLT
; X86-NEXT: movl (%eax), %esi
; X86-NEXT: leal __emutls_v.k@GOTOFF(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll __emutls_get_address@PLT
; X86-NEXT: addl (%eax), %esi
; X86-NEXT: movl %esi, %eax

; X64-LABEL: f5:
; X64: leaq __emutls_v.j(%rip), %rdi
Expand All @@ -110,39 +110,39 @@ entry:

;;;;; 32-bit targets

; X32: .data{{$}}
; X32: .globl __emutls_v.i
; X32-LABEL: __emutls_v.i:
; X32-NEXT: .long 4
; X32-NEXT: .long 4
; X32-NEXT: .long 0
; X32-NEXT: .long __emutls_t.i

; X32: .section .rodata,
; X32-LABEL: __emutls_t.i:
; X32-NEXT: .long 15

; X32: .data{{$}}
; X32-NOT: .globl
; X32-LABEL: __emutls_v.j:
; X32-NEXT: .long 4
; X32-NEXT: .long 4
; X32-NEXT: .long 0
; X32-NEXT: .long __emutls_t.j

; X32: .section .rodata,
; X32-LABEL: __emutls_t.j:
; X32-NEXT: .long 42

; X32: .data{{$}}
; X32-NOT: .globl
; X32-LABEL: __emutls_v.k:
; X32-NEXT: .long 4
; X32-NEXT: .long 8
; X32-NEXT: .long 0
; X32-NEXT: .long 0

; X32-NOT: __emutls_t.k:
; X86: .data{{$}}
; X86: .globl __emutls_v.i
; X86-LABEL: __emutls_v.i:
; X86-NEXT: .long 4
; X86-NEXT: .long 4
; X86-NEXT: .long 0
; X86-NEXT: .long __emutls_t.i

; X86: .section .rodata,
; X86-LABEL: __emutls_t.i:
; X86-NEXT: .long 15

; X86: .data{{$}}
; X86-NOT: .globl
; X86-LABEL: __emutls_v.j:
; X86-NEXT: .long 4
; X86-NEXT: .long 4
; X86-NEXT: .long 0
; X86-NEXT: .long __emutls_t.j

; X86: .section .rodata,
; X86-LABEL: __emutls_t.j:
; X86-NEXT: .long 42

; X86: .data{{$}}
; X86-NOT: .globl
; X86-LABEL: __emutls_v.k:
; X86-NEXT: .long 4
; X86-NEXT: .long 8
; X86-NEXT: .long 0
; X86-NEXT: .long 0

; X86-NOT: __emutls_t.k:

;;;;; 64-bit targets

Expand Down
92 changes: 46 additions & 46 deletions llvm/test/CodeGen/X86/emutls-pie.ll
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
; RUN: llc < %s -emulated-tls -mcpu=generic -mtriple=i386-linux-gnu -relocation-model=pic \
; RUN: | FileCheck -check-prefix=X32 %s
; RUN: | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -emulated-tls -mcpu=generic -mtriple=x86_64-linux-gnu -relocation-model=pic \
; RUN: | FileCheck -check-prefix=X64 %s
; RUN: llc < %s -emulated-tls -mcpu=generic -mtriple=i386-linux-android -relocation-model=pic \
; RUN: | FileCheck -check-prefix=X32 %s
; RUN: | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -emulated-tls -mcpu=generic -mtriple=x86_64-linux-android -relocation-model=pic \
; RUN: | FileCheck -check-prefix=X64 %s

Expand All @@ -12,7 +12,7 @@
; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux-gnu -relocation-model=pic \
; RUN: | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mcpu=generic -mtriple=i386-linux-android -relocation-model=pic \
; RUN: | FileCheck -check-prefix=X32 %s
; RUN: | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux-android -relocation-model=pic \
; RUN: | FileCheck -check-prefix=X64 %s

Expand All @@ -23,16 +23,16 @@
declare i8* @my_emutls_get_address(i8*)

define i32 @my_get_xyz() {
; X32-LABEL: my_get_xyz:
; X32: movl my_emutls_v_xyz@GOT(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll my_emutls_get_address@PLT
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $8, %esp
; X32-NEXT: .cfi_def_cfa_offset 8
; X32-NEXT: popl %ebx
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: my_get_xyz:
; X86: movl my_emutls_v_xyz@GOT(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll my_emutls_get_address@PLT
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $8, %esp
; X86-NEXT: .cfi_def_cfa_offset 8
; X86-NEXT: popl %ebx
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
; X64-LABEL: my_get_xyz:
; X64: movq my_emutls_v_xyz@GOTPCREL(%rip), %rdi
; X64-NEXT: callq my_emutls_get_address@PLT
Expand All @@ -52,16 +52,16 @@ entry:
@i2 = external thread_local global i32

define i32 @f1() {
; X32-LABEL: f1:
; X32: leal __emutls_v.i@GOTOFF(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll __emutls_get_address@PLT
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $8, %esp
; X32-NEXT: .cfi_def_cfa_offset 8
; X32-NEXT: popl %ebx
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f1:
; X86: leal __emutls_v.i@GOTOFF(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll __emutls_get_address@PLT
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $8, %esp
; X86-NEXT: .cfi_def_cfa_offset 8
; X86-NEXT: popl %ebx
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
; X64-LABEL: f1:
; X64: leaq __emutls_v.i(%rip), %rdi
; X64-NEXT: callq __emutls_get_address@PLT
Expand All @@ -76,10 +76,10 @@ entry:
}

define i32* @f2() {
; X32-LABEL: f2:
; X32: leal __emutls_v.i@GOTOFF(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll __emutls_get_address@PLT
; X86-LABEL: f2:
; X86: leal __emutls_v.i@GOTOFF(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll __emutls_get_address@PLT
; X64-LABEL: f2:
; X64: leaq __emutls_v.i(%rip), %rdi
; X64-NEXT: callq __emutls_get_address@PLT
Expand All @@ -89,10 +89,10 @@ entry:
}

define i32 @f3() {
; X32-LABEL: f3:
; X32: movl __emutls_v.i2@GOT(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll __emutls_get_address@PLT
; X86-LABEL: f3:
; X86: movl __emutls_v.i2@GOT(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll __emutls_get_address@PLT
; X64-LABEL: f3:
; X64: movq __emutls_v.i2@GOTPCREL(%rip), %rdi
; X64-NEXT: callq __emutls_get_address@PLT
Expand All @@ -103,10 +103,10 @@ entry:
}

define i32* @f4() {
; X32-LABEL: f4:
; X32: movl __emutls_v.i2@GOT(%ebx), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll __emutls_get_address@PLT
; X86-LABEL: f4:
; X86: movl __emutls_v.i2@GOT(%ebx), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll __emutls_get_address@PLT
; X64-LABEL: f4:
; X64: movq __emutls_v.i2@GOTPCREL(%rip), %rdi
; X64-NEXT: callq __emutls_get_address@PLT
Expand All @@ -117,19 +117,19 @@ entry:

;;;;; 32-bit targets

; X32: .data
; X32-LABEL: __emutls_v.i:
; X32-NEXT: .long 4
; X32-NEXT: .long 4
; X32-NEXT: .long 0
; X32-NEXT: .long __emutls_t.i
; X86: .data
; X86-LABEL: __emutls_v.i:
; X86-NEXT: .long 4
; X86-NEXT: .long 4
; X86-NEXT: .long 0
; X86-NEXT: .long __emutls_t.i

; X32: .section .rodata,
; X32-LABEL: __emutls_t.i:
; X32-NEXT: .long 15
; X86: .section .rodata,
; X86-LABEL: __emutls_t.i:
; X86-NEXT: .long 15

; X32-NOT: __emutls_v.i2
; X32-NOT: __emutls_t.i2
; X86-NOT: __emutls_v.i2
; X86-NOT: __emutls_t.i2

;;;;; 64-bit targets

Expand Down
278 changes: 139 additions & 139 deletions llvm/test/CodeGen/X86/emutls.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-gnu | FileCheck -check-prefix=X32 %s
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-gnu | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -emulated-tls -mtriple=x86_64-linux-gnu | FileCheck -check-prefix=X64 %s
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-android | FileCheck -check-prefix=X32 %s
; RUN: llc < %s -emulated-tls -mtriple=i386-linux-android | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -emulated-tls -mtriple=x86_64-linux-android | FileCheck -check-prefix=X64 %s

; RUN: llc < %s -mtriple=i386-linux-gnu | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mtriple=i386-linux-android | FileCheck -check-prefix=X32 %s
; RUN: llc < %s -mtriple=i386-linux-android | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -mtriple=x86_64-linux-android | FileCheck -check-prefix=X64 %s

; Copied from tls.ll; emulated TLS model is not implemented
Expand All @@ -18,13 +18,13 @@
declare i8* @my_emutls_get_address(i8*)

define i32 @my_get_xyz() {
; X32-LABEL: my_get_xyz:
; X32: movl $my_emutls_v_xyz, (%esp)
; X32-NEXT: calll my_emutls_get_address
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: my_get_xyz:
; X86: movl $my_emutls_v_xyz, (%esp)
; X86-NEXT: calll my_emutls_get_address
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
;
; X64-LABEL: my_get_xyz:
; X64: movl $my_emutls_v_xyz, %edi
Expand All @@ -49,13 +49,13 @@ entry:
@b1 = thread_local global i8 0

define i32 @f1() {
; X32-LABEL: f1:
; X32: movl $__emutls_v.i1, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f1:
; X86: movl $__emutls_v.i1, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
;
; X64-LABEL: f1:
; X64: movl $__emutls_v.i1, %edi
Expand All @@ -70,12 +70,12 @@ entry:
}

define i32* @f2() {
; X32-LABEL: f2:
; X32: movl $__emutls_v.i1, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f2:
; X86: movl $__emutls_v.i1, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
;
; X64-LABEL: f2:
; X64: movl $__emutls_v.i1, %edi
Expand All @@ -88,147 +88,147 @@ entry:
}

define i32 @f3() nounwind {
; X32-LABEL: f3:
; X32: movl $__emutls_v.i2, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: f3:
; X86: movl $__emutls_v.i2, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
entry:
%tmp1 = load i32, i32* @i2
ret i32 %tmp1
}

define i32* @f4() {
; X32-LABEL: f4:
; X32: movl $__emutls_v.i2, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f4:
; X86: movl $__emutls_v.i2, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
ret i32* @i2
}

define i32 @f5() nounwind {
; X32-LABEL: f5:
; X32: movl $__emutls_v.i3, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: f5:
; X86: movl $__emutls_v.i3, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
entry:
%tmp1 = load i32, i32* @i3
ret i32 %tmp1
}

define i32* @f6() {
; X32-LABEL: f6:
; X32: movl $__emutls_v.i3, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f6:
; X86: movl $__emutls_v.i3, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
ret i32* @i3
}

define i32 @f7() {
; X32-LABEL: f7:
; X32: movl $__emutls_v.i4, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f7:
; X86: movl $__emutls_v.i4, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
%tmp1 = load i32, i32* @i4
ret i32 %tmp1
}

define i32* @f8() {
; X32-LABEL: f8:
; X32: movl $__emutls_v.i4, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f8:
; X86: movl $__emutls_v.i4, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
ret i32* @i4
}

define i32 @f9() {
; X32-LABEL: f9:
; X32: movl $__emutls_v.i5, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f9:
; X86: movl $__emutls_v.i5, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
%tmp1 = load i32, i32* @i5
ret i32 %tmp1
}

define i32* @f10() {
; X32-LABEL: f10:
; X32: movl $__emutls_v.i5, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f10:
; X86: movl $__emutls_v.i5, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
ret i32* @i5
}

define i16 @f11() {
; X32-LABEL: f11:
; X32: movl $__emutls_v.s1, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movzwl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f11:
; X86: movl $__emutls_v.s1, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movzwl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
%tmp1 = load i16, i16* @s1
ret i16 %tmp1
}

define i32 @f12() {
; X32-LABEL: f12:
; X32: movl $__emutls_v.s1, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movswl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f12:
; X86: movl $__emutls_v.s1, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movswl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
%tmp1 = load i16, i16* @s1
%tmp2 = sext i16 %tmp1 to i32
ret i32 %tmp2
}

define i8 @f13() {
; X32-LABEL: f13:
; X32: movl $__emutls_v.b1, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movb (%eax), %al
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f13:
; X86: movl $__emutls_v.b1, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movb (%eax), %al
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
%tmp1 = load i8, i8* @b1
ret i8 %tmp1
}

define i32 @f14() {
; X32-LABEL: f14:
; X32: movl $__emutls_v.b1, (%esp)
; X32-NEXT: calll __emutls_get_address
; X32-NEXT: movsbl (%eax), %eax
; X32-NEXT: addl $12, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
; X86-LABEL: f14:
; X86: movl $__emutls_v.b1, (%esp)
; X86-NEXT: calll __emutls_get_address
; X86-NEXT: movsbl (%eax), %eax
; X86-NEXT: addl $12, %esp
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
entry:
%tmp1 = load i8, i8* @b1
%tmp2 = sext i8 %tmp1 to i32
Expand All @@ -237,55 +237,55 @@ entry:

;;;;;;;;;;;;;; 32-bit __emutls_v. and __emutls_t.

; X32-LABEL: __emutls_v.i1:
; X32-NEXT: .long 4
; X32-NEXT: .long 4
; X32-NEXT: .long 0
; X32-NEXT: .long __emutls_t.i1
; X86-LABEL: __emutls_v.i1:
; X86-NEXT: .long 4
; X86-NEXT: .long 4
; X86-NEXT: .long 0
; X86-NEXT: .long __emutls_t.i1

; X32-LABEL: __emutls_t.i1:
; X32-NEXT: .long 15
; X86-LABEL: __emutls_t.i1:
; X86-NEXT: .long 15

; X32-NOT: __emutls_v.i2
; X86-NOT: __emutls_v.i2

; X32-LABEL: __emutls_v.i3:
; X32-NEXT: .long 4
; X32-NEXT: .long 4
; X32-NEXT: .long 0
; X32-NEXT: .long __emutls_t.i3
; X86-LABEL: __emutls_v.i3:
; X86-NEXT: .long 4
; X86-NEXT: .long 4
; X86-NEXT: .long 0
; X86-NEXT: .long __emutls_t.i3

; X32-LABEL: __emutls_t.i3:
; X32-NEXT: .long 15
; X86-LABEL: __emutls_t.i3:
; X86-NEXT: .long 15

; X32-LABEL: __emutls_v.i4:
; X32-NEXT: .long 4
; X32-NEXT: .long 4
; X32-NEXT: .long 0
; X32-NEXT: .long __emutls_t.i4
; X86-LABEL: __emutls_v.i4:
; X86-NEXT: .long 4
; X86-NEXT: .long 4
; X86-NEXT: .long 0
; X86-NEXT: .long __emutls_t.i4

; X32-LABEL: __emutls_t.i4:
; X32-NEXT: .long 15
; X86-LABEL: __emutls_t.i4:
; X86-NEXT: .long 15

; X32-NOT: __emutls_v.i5:
; X32: .hidden __emutls_v.i5
; X32-NOT: __emutls_v.i5:
; X86-NOT: __emutls_v.i5:
; X86: .hidden __emutls_v.i5
; X86-NOT: __emutls_v.i5:

; X32-LABEL: __emutls_v.s1:
; X32-NEXT: .long 2
; X32-NEXT: .long 2
; X32-NEXT: .long 0
; X32-NEXT: .long __emutls_t.s1
; X86-LABEL: __emutls_v.s1:
; X86-NEXT: .long 2
; X86-NEXT: .long 2
; X86-NEXT: .long 0
; X86-NEXT: .long __emutls_t.s1

; X32-LABEL: __emutls_t.s1:
; X32-NEXT: .short 15
; X86-LABEL: __emutls_t.s1:
; X86-NEXT: .short 15

; X32-LABEL: __emutls_v.b1:
; X32-NEXT: .long 1
; X32-NEXT: .long 1
; X32-NEXT: .long 0
; X32-NEXT: .long 0
; X86-LABEL: __emutls_v.b1:
; X86-NEXT: .long 1
; X86-NEXT: .long 1
; X86-NEXT: .long 0
; X86-NEXT: .long 0

; X32-NOT: __emutls_t.b1
; X86-NOT: __emutls_t.b1

;;;;;;;;;;;;;; 64-bit __emutls_v. and __emutls_t.

Expand Down