Re: [AArch64/testsuite] Add more TLS local executable testcases

2015-10-02 Thread Marcus Shawcroft
On 22 September 2015 at 17:49, Jiong Wang  wrote:

> 2015-09-22  Jiong Wang  
>
> gcc/testsuite/
>* 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.
>

OK /Marcus


Re: [AArch64/testsuite] Add more TLS local executable testcases

2015-10-02 Thread Jiong Wang

Jiong Wang writes:

> Marcus Shawcroft writes:
>
>> On 26 August 2015 at 14:58, Jiong Wang  wrote:
>>>
>>> This patch cover tlsle tiny model tests, tls size truncation for tiny &
>>> small model included also.
>>>
>>> All testcases pass native test.
>>>
>>> OK for trunk?
>>>
>>> 2015-08-26  Jiong Wang  
>>>
>>> gcc/testsuite/
>>>   * 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.
>>
>> Hi Jiong
>> These tests are fragile if the test suite is run with an explicit
>> -mcmodel=* option.  I think they need appropriate dg-skip-if
>> directives to ensure they only run with the expected model.
>> /Marcus
>
> OK, how about the new one?
>
> 2015-09-22  Jiong Wang  
>
> gcc/testsuite/
>* 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.
>

Ping.

-- 
Regards,
Jiong



Re: [AArch64/testsuite] Add more TLS local executable testcases

2015-09-22 Thread Jiong Wang

Marcus Shawcroft writes:

> On 26 August 2015 at 14:58, Jiong Wang  wrote:
>>
>> This patch cover tlsle tiny model tests, tls size truncation for tiny &
>> small model included also.
>>
>> All testcases pass native test.
>>
>> OK for trunk?
>>
>> 2015-08-26  Jiong Wang  
>>
>> gcc/testsuite/
>>   * 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.
>
> Hi Jiong
> These tests are fragile if the test suite is run with an explicit
> -mcmodel=* option.  I think they need appropriate dg-skip-if
> directives to ensure they only run with the expected model.
> /Marcus

OK, how about the new one?

2015-09-22  Jiong Wang  

gcc/testsuite/
   * 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.
   
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle12_tiny.c b/gcc/testsuite/gcc.target/aarch64/tlsle12_tiny.c
new file mode 100644
index 000..2f81793
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tlsle12_tiny.c
@@ -0,0 +1,9 @@
+/* { 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 "tlsle_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle24_tiny.c b/gcc/testsuite/gcc.target/aarch64/tlsle24_tiny.c
new file mode 100644
index 000..7d5df1b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tlsle24_tiny.c
@@ -0,0 +1,10 @@
+/* { 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 "tlsle_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12_nc" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_hi12" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small.c b/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small.c
new file mode 100644
index 000..d1fa542
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small.c
@@ -0,0 +1,11 @@
+/* { 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 "tlsle_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_g1" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_g0_nc" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny.c b/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny.c
new file mode 100644
index 000..444854e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny.c
@@ -0,0 +1,10 @@
+/* { 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 "tlsle_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12_nc" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_hi12" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */


Re: [AArch64/testsuite] Add more TLS local executable testcases

2015-09-22 Thread Marcus Shawcroft
On 26 August 2015 at 14:58, Jiong Wang  wrote:
>
> This patch cover tlsle tiny model tests, tls size truncation for tiny &
> small model included also.
>
> All testcases pass native test.
>
> OK for trunk?
>
> 2015-08-26  Jiong Wang  
>
> gcc/testsuite/
>   * 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.

Hi Jiong
These tests are fragile if the test suite is run with an explicit
-mcmodel=* option.  I think they need appropriate dg-skip-if
directives to ensure they only run with the expected model.
/Marcus


[AArch64/testsuite] Add more TLS local executable testcases

2015-08-26 Thread Jiong Wang

This patch cover tlsle tiny model tests, tls size truncation for tiny &
small model included also.

All testcases pass native test.

OK for trunk?

2015-08-26  Jiong Wang  

gcc/testsuite/
  * 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.
  
-- 
Regards,
Jiong

Index: gcc/testsuite/gcc.target/aarch64/tlsle12_tiny_1.c
===
--- gcc/testsuite/gcc.target/aarch64/tlsle12_tiny_1.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/tlsle12_tiny_1.c	(working copy)
@@ -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" } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
Index: gcc/testsuite/gcc.target/aarch64/tlsle24_tiny_1.c
===
--- gcc/testsuite/gcc.target/aarch64/tlsle24_tiny_1.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/tlsle24_tiny_1.c	(working copy)
@@ -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" } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12_nc" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_hi12" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
Index: gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small_1.c
===
--- gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small_1.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_small_1.c	(working copy)
@@ -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" } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_g1" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_g0_nc" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
Index: gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny_1.c
===
--- gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny_1.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/tlsle_sizeadj_tiny_1.c	(working copy)
@@ -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" } */
+
+#include "tls_1.x"
+
+/* { dg-final { scan-assembler-times "#:tprel_lo12_nc" 2 } } */
+/* { dg-final { scan-assembler-times "#:tprel_hi12" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */