public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: testsuite: refine __tls_get_addr tests with tls_native
@ 2022-08-24 14:09 Xi Ruoyao
  2022-08-29  3:35 ` Lulu Cheng
  0 siblings, 1 reply; 2+ messages in thread
From: Xi Ruoyao @ 2022-08-24 14:09 UTC (permalink / raw)
  To: gcc-patches, Lulu Cheng

If GCC is not built with a working linker for the target (developers
occansionally build such a "minimal" GCC for testing and debugging),
TLS will be emulated and __tls_get_addr won't be used.  Refine those
tests depending on __tls_get_addr with tls_native to avoid test
failures.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/func-call-medium-1.c: Refine test
	depending on __tls_get_addr with { target tls_native }.
	* gcc.target/loongarch/func-call-medium-2.c: Likewise.
	* gcc.target/loongarch/func-call-medium-3.c: Likewise.
	* gcc.target/loongarch/func-call-medium-4.c: Likewise.
	* gcc.target/loongarch/func-call-medium-5.c: Likewise.
	* gcc.target/loongarch/func-call-medium-6.c: Likewise.
	* gcc.target/loongarch/func-call-medium-7.c: Likewise.
	* gcc.target/loongarch/func-call-medium-8.c: Likewise.
	* gcc.target/loongarch/tls-gd-noplt.c: Likewise.
---
 gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c | 2 +-
 gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c | 2 +-
 gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c | 2 +-
 gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c | 2 +-
 gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c | 2 +-
 gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c | 2 +-
 gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c | 2 +-
 gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c | 3 ++-
 gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c       | 2 +-
 9 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c
index 276d73e5ee8..6339e832fe5 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
 /* { dg-final { scan-assembler "test1:.*la\.global\t.*f\n\tjirl" } } */
 /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
-/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
+/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
 
 extern void g (void);
 void
diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c
index 237821c066b..a53e75e0bf9 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
 /* { dg-final { scan-assembler "test1:.*la\.local\t.*f\n\tjirl" } } */
 /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
-/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
+/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
 
 extern void g (void);
 void
diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c
index 9a6e16103bc..0da7bf98e3c 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
 /* { dg-final { scan-assembler "test1:.*la\.global\t.*f\n\tjirl" } } */
 /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
-/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
+/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
 
 extern void g (void);
 void
diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c
index 2577e345239..0219688ae80 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
 /* { dg-final { scan-assembler "test1:.*la\.local\t.*f\n\tjirl" } } */
 /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
-/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
+/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
 
 extern void g (void);
 void
diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c
index d70b6ea4663..8a47b5afcba 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler "test:.*pcalau12i.*%pc_hi20\\(g\\)\n\tjirl.*pc_lo12\\(g\\)" } } */
 /* { dg-final { scan-assembler "test1:.*pcalau12i.*%pc_hi20\\(f\\)\n\tjirl.*%pc_lo12\\(f\\)" } } */
 /* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
-/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" } } */
+/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
 
 extern void g (void);
 
diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c
index f963a99441a..1e75e60e01a 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler "test:.*pcalau12i.*%pc_hi20\\(g\\)\n\tjirl.*pc_lo12\\(g\\)" } } */
 /* { dg-final { scan-assembler "test1:.*pcalau12i.*%pc_hi20\\(f\\)\n\tjirl.*%pc_lo12\\(f\\)" } } */
 /* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
-/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" } } */
+/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
 
 extern void g (void);
 
diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c
index f2818b2da76..9e89085ca19 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c
@@ -3,7 +3,7 @@
 /* { dg-final { scan-assembler "test:.*pcalau12i\t.*%got_pc_hi20\\(g\\)\n\tld\.d\t.*%got_pc_lo12\\(g\\)\n\tjirl" } } */
 /* { dg-final { scan-assembler "test1:.*pcalau12i\t.*%got_pc_hi20\\(f\\)\n\tld\.d\t.*%got_pc_lo12\\(f\\)\n\tjirl" } } */
 /* { dg-final { scan-assembler "test2:.*pcalau12i\t.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
-/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" } } */
+/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
 
 
 extern void g (void);
diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c
index 7fa873d84bb..fde9c6e0ef4 100644
--- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c
+++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c
@@ -3,7 +3,8 @@
 /* { dg-final { scan-assembler "test:.*pcalau12i\t.*%got_pc_hi20\\(g\\)\n\tld\.d\t.*%got_pc_lo12\\(g\\)\n\tjirl" } } */
 /* { dg-final { scan-assembler "test1:.*pcalau12i\t.*%pc_hi20\\(f\\)\n\tjirl.*%pc_lo12\\(f\\)" } } */
 /* { dg-final { scan-assembler "test2:.*pcalau12i\t.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
-/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" } } */
+/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
+/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
 
 extern void g (void);
 
diff --git a/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c b/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c
index 375663286f0..9432c477e9d 100644
--- a/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c
+++ b/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O0 -fno-plt -mcmodel=normal -mexplicit-relocs" } */
-/* { dg-final { scan-assembler "pcalau12i\t.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" } } */
+/* { dg-final { scan-assembler "pcalau12i\t.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
 
 __attribute__ ((tls_model ("global-dynamic"))) __thread int a;
 
-- 
2.37.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] LoongArch: testsuite: refine __tls_get_addr tests with tls_native
  2022-08-24 14:09 [PATCH] LoongArch: testsuite: refine __tls_get_addr tests with tls_native Xi Ruoyao
@ 2022-08-29  3:35 ` Lulu Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Lulu Cheng @ 2022-08-29  3:35 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-patches

LGTM!

Thanks.

在 2022/8/24 下午10:09, Xi Ruoyao 写道:
> If GCC is not built with a working linker for the target (developers
> occansionally build such a "minimal" GCC for testing and debugging),
> TLS will be emulated and __tls_get_addr won't be used.  Refine those
> tests depending on __tls_get_addr with tls_native to avoid test
> failures.
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.target/loongarch/func-call-medium-1.c: Refine test
> 	depending on __tls_get_addr with { target tls_native }.
> 	* gcc.target/loongarch/func-call-medium-2.c: Likewise.
> 	* gcc.target/loongarch/func-call-medium-3.c: Likewise.
> 	* gcc.target/loongarch/func-call-medium-4.c: Likewise.
> 	* gcc.target/loongarch/func-call-medium-5.c: Likewise.
> 	* gcc.target/loongarch/func-call-medium-6.c: Likewise.
> 	* gcc.target/loongarch/func-call-medium-7.c: Likewise.
> 	* gcc.target/loongarch/func-call-medium-8.c: Likewise.
> 	* gcc.target/loongarch/tls-gd-noplt.c: Likewise.
> ---
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c | 2 +-
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c | 2 +-
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c | 2 +-
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c | 2 +-
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c | 2 +-
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c | 2 +-
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c | 2 +-
>   gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c | 3 ++-
>   gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c       | 2 +-
>   9 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c
> index 276d73e5ee8..6339e832fe5 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-1.c
> @@ -3,7 +3,7 @@
>   /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test1:.*la\.global\t.*f\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
> -/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
> +/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
>   
>   extern void g (void);
>   void
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c
> index 237821c066b..a53e75e0bf9 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-2.c
> @@ -3,7 +3,7 @@
>   /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test1:.*la\.local\t.*f\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
> -/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
> +/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
>   
>   extern void g (void);
>   void
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c
> index 9a6e16103bc..0da7bf98e3c 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-3.c
> @@ -3,7 +3,7 @@
>   /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test1:.*la\.global\t.*f\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
> -/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
> +/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
>   
>   extern void g (void);
>   void
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c
> index 2577e345239..0219688ae80 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-4.c
> @@ -3,7 +3,7 @@
>   /* { dg-final { scan-assembler "test:.*la\.global\t.*g\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test1:.*la\.local\t.*f\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test2:.*la\.local\t.*l\n\tjirl" } } */
> -/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" } } */
> +/* { dg-final { scan-assembler "test3:.*la\.global\t.*\_\_tls\_get\_addr" { target tls_native } } } */
>   
>   extern void g (void);
>   void
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c
> index d70b6ea4663..8a47b5afcba 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-5.c
> @@ -3,7 +3,7 @@
>   /* { dg-final { scan-assembler "test:.*pcalau12i.*%pc_hi20\\(g\\)\n\tjirl.*pc_lo12\\(g\\)" } } */
>   /* { dg-final { scan-assembler "test1:.*pcalau12i.*%pc_hi20\\(f\\)\n\tjirl.*%pc_lo12\\(f\\)" } } */
>   /* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
> -/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" } } */
> +/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
>   
>   extern void g (void);
>   
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c
> index f963a99441a..1e75e60e01a 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-6.c
> @@ -3,7 +3,7 @@
>   /* { dg-final { scan-assembler "test:.*pcalau12i.*%pc_hi20\\(g\\)\n\tjirl.*pc_lo12\\(g\\)" } } */
>   /* { dg-final { scan-assembler "test1:.*pcalau12i.*%pc_hi20\\(f\\)\n\tjirl.*%pc_lo12\\(f\\)" } } */
>   /* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
> -/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" } } */
> +/* { dg-final { scan-assembler "test3:.*pcalau12i.*%pc_hi20\\(__tls_get_addr\\)\n\t.*\n\tjirl.*%pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
>   
>   extern void g (void);
>   
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c
> index f2818b2da76..9e89085ca19 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-7.c
> @@ -3,7 +3,7 @@
>   /* { dg-final { scan-assembler "test:.*pcalau12i\t.*%got_pc_hi20\\(g\\)\n\tld\.d\t.*%got_pc_lo12\\(g\\)\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test1:.*pcalau12i\t.*%got_pc_hi20\\(f\\)\n\tld\.d\t.*%got_pc_lo12\\(f\\)\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test2:.*pcalau12i\t.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
> -/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" } } */
> +/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
>   
>   
>   extern void g (void);
> diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c b/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c
> index 7fa873d84bb..fde9c6e0ef4 100644
> --- a/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c
> +++ b/gcc/testsuite/gcc.target/loongarch/func-call-medium-8.c
> @@ -3,7 +3,8 @@
>   /* { dg-final { scan-assembler "test:.*pcalau12i\t.*%got_pc_hi20\\(g\\)\n\tld\.d\t.*%got_pc_lo12\\(g\\)\n\tjirl" } } */
>   /* { dg-final { scan-assembler "test1:.*pcalau12i\t.*%pc_hi20\\(f\\)\n\tjirl.*%pc_lo12\\(f\\)" } } */
>   /* { dg-final { scan-assembler "test2:.*pcalau12i\t.*%pc_hi20\\(l\\)\n\tjirl.*%pc_lo12\\(l\\)" } } */
> -/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" } } */
> +/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
> +/* { dg-final { scan-assembler "test3:.*pcalau12i.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
>   
>   extern void g (void);
>   
> diff --git a/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c b/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c
> index 375663286f0..9432c477e9d 100644
> --- a/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c
> +++ b/gcc/testsuite/gcc.target/loongarch/tls-gd-noplt.c
> @@ -1,6 +1,6 @@
>   /* { dg-do compile } */
>   /* { dg-options "-O0 -fno-plt -mcmodel=normal -mexplicit-relocs" } */
> -/* { dg-final { scan-assembler "pcalau12i\t.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" } } */
> +/* { dg-final { scan-assembler "pcalau12i\t.*%got_pc_hi20\\(__tls_get_addr\\)\n\tld\.d.*%got_pc_lo12\\(__tls_get_addr\\)" { target tls_native } } } */
>   
>   __attribute__ ((tls_model ("global-dynamic"))) __thread int a;
>   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-29  3:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 14:09 [PATCH] LoongArch: testsuite: refine __tls_get_addr tests with tls_native Xi Ruoyao
2022-08-29  3:35 ` Lulu Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).