[lld] r361085 - [ELF] Add {i386, x86-64}-tls-le-align.s to test TP offsets for TLS Variant 2

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 17:57:30 PDT 2019


Author: maskray
Date: Fri May 17 17:57:30 2019
New Revision: 361085

URL: http://llvm.org/viewvc/llvm-project?rev=361085&view=rev
Log:
[ELF] Add {i386,x86-64}-tls-le-align.s to test TP offsets for TLS Variant 2

I forgot to add them in rLLD361084. I made another mistake, rLLD361084 fixed Variant 2, not Variant 1.

Added:
    lld/trunk/test/ELF/i386-tls-le-align.s
    lld/trunk/test/ELF/x86-64-tls-le-align.s

Added: lld/trunk/test/ELF/i386-tls-le-align.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/i386-tls-le-align.s?rev=361085&view=auto
==============================================================================
--- lld/trunk/test/ELF/i386-tls-le-align.s (added)
+++ lld/trunk/test/ELF/i386-tls-le-align.s Fri May 17 17:57:30 2019
@@ -0,0 +1,16 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=i386 %s -o %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s
+
+# -alignTo(p_memsz, p_align) = -alignTo(4, 64) = -64
+
+# CHECK: movl %gs:0xffffffc0, %eax
+
+  movl %gs:a at NTPOFF, %eax
+
+.section .tbss,"awT"
+.align 64
+a:
+.long 0
+.size a, 4

Added: lld/trunk/test/ELF/x86-64-tls-le-align.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-tls-le-align.s?rev=361085&view=auto
==============================================================================
--- lld/trunk/test/ELF/x86-64-tls-le-align.s (added)
+++ lld/trunk/test/ELF/x86-64-tls-le-align.s Fri May 17 17:57:30 2019
@@ -0,0 +1,16 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
+
+# -alignTo(p_memsz, p_align) = -alignTo(4, 64) = -64
+
+# CHECK: movl %fs:-64, %eax
+
+  movl %fs:a at TPOFF, %eax
+
+.section .tbss,"awT"
+.align 64
+a:
+.long 0
+.size a, 4




More information about the llvm-commits mailing list