summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-18 00:57:30 +0000
committerFangrui Song <maskray@google.com>2019-05-18 00:57:30 +0000
commitdb5cb0fce77f712709662c57636c42c17cd83af0 (patch)
treedb14a827489b3c514e55d14c59630da22146a464
parent348731aeed4b5974f4ba6f6eebd0d3a19d5632d2 (diff)
downloadbcm5719-llvm-db5cb0fce77f712709662c57636c42c17cd83af0.tar.gz
bcm5719-llvm-db5cb0fce77f712709662c57636c42c17cd83af0.zip
[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. llvm-svn: 361085
-rw-r--r--lld/test/ELF/i386-tls-le-align.s16
-rw-r--r--lld/test/ELF/x86-64-tls-le-align.s16
2 files changed, 32 insertions, 0 deletions
diff --git a/lld/test/ELF/i386-tls-le-align.s b/lld/test/ELF/i386-tls-le-align.s
new file mode 100644
index 00000000000..3faa3b2fbb9
--- /dev/null
+++ b/lld/test/ELF/i386-tls-le-align.s
@@ -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@NTPOFF, %eax
+
+.section .tbss,"awT"
+.align 64
+a:
+.long 0
+.size a, 4
diff --git a/lld/test/ELF/x86-64-tls-le-align.s b/lld/test/ELF/x86-64-tls-le-align.s
new file mode 100644
index 00000000000..d2ffd2a9a98
--- /dev/null
+++ b/lld/test/ELF/x86-64-tls-le-align.s
@@ -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@TPOFF, %eax
+
+.section .tbss,"awT"
+.align 64
+a:
+.long 0
+.size a, 4
OpenPOWER on IntegriCloud