[AArch64] Add more TLS local executable testcases
authorJiong Wang <jiong.wang@arm.com>
Fri, 2 Oct 2015 14:47:34 +0000 (14:47 +0000)
committerJiong Wang <jiwang@gcc.gnu.org>
Fri, 2 Oct 2015 14:47:34 +0000 (14:47 +0000)
2015-10-02  Jiong Wang  <jiong.wang@arm.com>

* gcc.target/aarch64/tlsle12_tiny_1.c: New testcase for tiny model.
* gcc.target/aarch64/tlsle24_tiny_1.c: Likewise.
* gcc.target/aarch64/tlsle_sizeadj_tiny_1.c: TLS size truncation test
for tiny model.
* gcc.target/aarch64/tlsle_sizeadj_small_1.c: TLS size truncation test
for small model.

From-SVN: r228395

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/tlsle12_tiny_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/tlsle24_tiny_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny_1.c [new file with mode: 0644]

index efea8e42a49ca05b498bc6694fe631247a66bd4e..774f34775d0361c09662f513d796e964f166a491 100644 (file)
@@ -1,3 +1,12 @@
+2015-10-02  Jiong Wang  <jiong.wang@arm.com>
+
+       * gcc.target/aarch64/tlsle12_tiny_1.c: New testcase for tiny model.
+       * gcc.target/aarch64/tlsle24_tiny_1.c: Likewise.
+       * gcc.target/aarch64/tlsle_sizeadj_tiny_1.c: TLS size truncation test
+       for tiny model.
+       * gcc.target/aarch64/tlsle_sizeadj_small_1.c: TLS size truncation test
+       for small model.
+
 2015-10-02  Kirill Yukhin  <kirill.yukhin@intel.com>
 
        * gcc.target/i386/vect-pack-trunc-1.c: New test.
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle12_tiny_1.c b/gcc/testsuite/gcc.target/aarch64/tlsle12_tiny_1.c
new file mode 100644 (file)
index 0000000..d9d439e
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do run } */
+/* { dg-require-effective-target tls_native } */
+/* { dg-options "-O2 -fpic -ftls-model=local-exec -mtls-size=12 -mcmodel=tiny --save-temps" } */
+/* { dg-skip-if "TLS 12bit size for tiny" { aarch64*-*-* }  { "-mcmodel=small" "-mcmodel=large" } { "" } } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle24_tiny_1.c b/gcc/testsuite/gcc.target/aarch64/tlsle24_tiny_1.c
new file mode 100644 (file)
index 0000000..2dfb06e
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+/* { dg-require-effective-target tls_native } */
+/* { dg-options "-O2 -fpic -ftls-model=local-exec -mtls-size=24 -mcmodel=tiny --save-temps" } */
+/* { dg-skip-if "TLS 24bit size for tiny" { aarch64*-*-* }  { "-mcmodel=small" "-mcmodel=large" } { "" } } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12_nc" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_hi12" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small_1.c b/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small_1.c
new file mode 100644 (file)
index 0000000..d9975f7
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+/* { dg-require-effective-target tls_native } */
+/* { dg-require-effective-target aarch64_tlsle32 } */
+/* { dg-options "-O2 -fpic -ftls-model=local-exec -mtls-size=48 --save-temps" } */
+/* { dg-skip-if "TLS size trunc for small" { aarch64*-*-* }  { "-mcmodel=tiny" "-mcmodel=large" } { "" } } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_g1" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_g0_nc" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny_1.c b/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny_1.c
new file mode 100644 (file)
index 0000000..8274764
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+/* { dg-require-effective-target tls_native } */
+/* { dg-options "-O2 -fpic -ftls-model=local-exec -mtls-size=32 -mcmodel=tiny --save-temps" } */
+/* { dg-skip-if "TLS size trunc for tiny" { aarch64*-*-* }  { "-mcmodel=small" "-mcmodel=large" } { "" } } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12_nc" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_hi12" 2 } } */