aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/tls11.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/tls11.ll')
-rw-r--r--test/CodeGen/X86/tls11.ll17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/CodeGen/X86/tls11.ll b/test/CodeGen/X86/tls11.ll
index 514a168..cc14826 100644
--- a/test/CodeGen/X86/tls11.ll
+++ b/test/CodeGen/X86/tls11.ll
@@ -1,7 +1,7 @@
-; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu > %t
-; RUN: grep {movzwl %gs:i@NTPOFF, %eax} %t
-; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu > %t2
-; RUN: grep {movzwl %fs:i@TPOFF, %eax} %t2
+; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu | FileCheck -check-prefix=X32_LINUX %s
+; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu | FileCheck -check-prefix=X64_LINUX %s
+; RUN: llc < %s -march=x86 -mtriple=x86-pc-win32 | FileCheck -check-prefix=X32_WIN %s
+; RUN: llc < %s -march=x86-64 -mtriple=x86_64-pc-win32 | FileCheck -check-prefix=X64_WIN %s
@i = thread_local global i16 15
@@ -10,3 +10,12 @@ entry:
%tmp1 = load i16* @i
ret i16 %tmp1
}
+; X32_LINUX: movzwl %gs:i@NTPOFF, %eax
+; X64_LINUX: movzwl %fs:i@TPOFF, %eax
+; X32_WIN: movl __tls_index, %eax
+; X32_WIN: movl %fs:__tls_array, %ecx
+; X32_WIN: movzwl _i@SECREL(%eax), %eax
+; X64_WIN: movl _tls_index(%rip), %eax
+; X64_WIN: movq %gs:88, %rcx
+; X64_WIN: movabsq $i@SECREL, %rcx
+; X64_WIN: movzwl (%rax,%rcx), %eax