diff mbox series

RISC-V: Require a extension for ztso testcases with atomic insns

Message ID 20240321170024.4024824-1-patrick@rivosinc.com
State New
Headers show
Series RISC-V: Require a extension for ztso testcases with atomic insns | expand

Commit Message

Patrick O'Neill March 21, 2024, 5 p.m. UTC
Use dg_add_options riscv_a to add atomic extension when running compile
tests on non-a targets.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/amo-table-ztso-amo-add-1.c: Add
	  dg_add_options riscv_a
	* gcc.target/riscv/amo-table-ztso-amo-add-2.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-amo-add-3.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-amo-add-4.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-amo-add-5.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-compare-exchange-1.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-compare-exchange-2.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-compare-exchange-3.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-compare-exchange-4.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-compare-exchange-5.c:	Ditto.
	* gcc.target/riscv/amo-table-ztso-compare-exchange-6.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-compare-exchange-7.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c: Ditto.
	* gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c: Ditto.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
---
 gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c        | 1 +
 gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c        | 1 +
 gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c        | 1 +
 gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c        | 1 +
 gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c        | 1 +
 .../gcc.target/riscv/amo-table-ztso-compare-exchange-1.c         | 1 +
 .../gcc.target/riscv/amo-table-ztso-compare-exchange-2.c         | 1 +
 .../gcc.target/riscv/amo-table-ztso-compare-exchange-3.c         | 1 +
 .../gcc.target/riscv/amo-table-ztso-compare-exchange-4.c         | 1 +
 .../gcc.target/riscv/amo-table-ztso-compare-exchange-5.c         | 1 +
 .../gcc.target/riscv/amo-table-ztso-compare-exchange-6.c         | 1 +
 .../gcc.target/riscv/amo-table-ztso-compare-exchange-7.c         | 1 +
 .../gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c          | 1 +
 .../gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c          | 1 +
 .../gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c          | 1 +
 .../gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c          | 1 +
 .../gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c          | 1 +
 17 files changed, 17 insertions(+)

Comments

Palmer Dabbelt March 22, 2024, 2:22 p.m. UTC | #1
On Thu, 21 Mar 2024 10:00:24 PDT (-0700), Patrick O'Neill wrote:
> Use dg_add_options riscv_a to add atomic extension when running compile
> tests on non-a targets.
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.target/riscv/amo-table-ztso-amo-add-1.c: Add
> 	  dg_add_options riscv_a
> 	* gcc.target/riscv/amo-table-ztso-amo-add-2.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-amo-add-3.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-amo-add-4.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-amo-add-5.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-compare-exchange-1.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-compare-exchange-2.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-compare-exchange-3.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-compare-exchange-4.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-compare-exchange-5.c:	Ditto.
> 	* gcc.target/riscv/amo-table-ztso-compare-exchange-6.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-compare-exchange-7.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c: Ditto.
> 	* gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c: Ditto.
>
> Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
> ---
>  gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c        | 1 +
>  gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c        | 1 +
>  gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c        | 1 +
>  gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c        | 1 +
>  gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c        | 1 +
>  .../gcc.target/riscv/amo-table-ztso-compare-exchange-1.c         | 1 +
>  .../gcc.target/riscv/amo-table-ztso-compare-exchange-2.c         | 1 +
>  .../gcc.target/riscv/amo-table-ztso-compare-exchange-3.c         | 1 +
>  .../gcc.target/riscv/amo-table-ztso-compare-exchange-4.c         | 1 +
>  .../gcc.target/riscv/amo-table-ztso-compare-exchange-5.c         | 1 +
>  .../gcc.target/riscv/amo-table-ztso-compare-exchange-6.c         | 1 +
>  .../gcc.target/riscv/amo-table-ztso-compare-exchange-7.c         | 1 +
>  .../gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c          | 1 +
>  .../gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c          | 1 +
>  .../gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c          | 1 +
>  .../gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c          | 1 +
>  .../gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c          | 1 +
>  17 files changed, 17 insertions(+)
>
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c
> index 65a4351025d..a9edc33ff39 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* Verify that atomic op mappings match the Ztso suggested mapping.  */
>  /* { dg-options "-O3" } */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
>  /* { dg-final { check-function-bodies "**" "" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c
> index 03da6b04de0..ad843402bcc 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* Verify that atomic op mappings the Ztso suggested mapping.  */
>  /* { dg-options "-O3" } */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
>  /* { dg-final { check-function-bodies "**" "" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c
> index 695306e9d6f..bdae5bb83a6 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* Verify that atomic op mappings match the Ztso suggested mapping.  */
>  /* { dg-options "-O3" } */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
>  /* { dg-final { check-function-bodies "**" "" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c
> index e7e5ac7cc88..815a72f1e56 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* Verify that atomic op mappings match the Ztso suggested mapping.  */
>  /* { dg-options "-O3" } */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
>  /* { dg-final { check-function-bodies "**" "" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c
> index 457d0b12fbe..eda6f01096e 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* Verify that atomic op mappings match the Ztso suggested mapping.  */
>  /* { dg-options "-O3" } */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
>  /* { dg-final { check-function-bodies "**" "" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c
> index dd6b5c24aa0..b6315c45e85 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c
> index b0bafa3296e..e487184f6cf 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c
> index 78cb8aa9748..e9c925f0923 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c
> index 0656b84c787..6b454559633 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c
> index 33d486c26ca..02c9f0ada77 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c
> index f8331bfcd0d..75abd5d3dfb 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c
> index b5c42e1df1d..33928c0eac4 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c
> index 3ba69ebc325..2a40d6b1376 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c
> index 4f38ed3015c..c79380f2611 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c
> index e5bcb127552..d1a94eccfa8 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c
> index 316183c268b..3d65bc2f64a 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c
> index fc1aa8d94f1..10354387a13 100644
> --- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c
> +++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
> +/* { dg-add-options riscv_a } */
>  /* { dg-add-options riscv_ztso } */
>  /* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
>  /* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */

Presumably these trip up on the non-A targets that Edwin's just adding to the
testers?  They'd also trip up anyone running newlib/mulilib tests.

Either way they look right to me, so

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

Thanks!
Patrick O'Neill March 22, 2024, 5:47 p.m. UTC | #2
On 3/22/24 07:22, Palmer Dabbelt wrote:
> On Thu, 21 Mar 2024 10:00:24 PDT (-0700), Patrick O'Neill wrote:
>> Use dg_add_options riscv_a to add atomic extension when running compile
>> tests on non-a targets.
>>
>> gcc/testsuite/ChangeLog:
>>
>>     * gcc.target/riscv/amo-table-ztso-amo-add-1.c: Add
>>       dg_add_options riscv_a
>>     * gcc.target/riscv/amo-table-ztso-amo-add-2.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-amo-add-3.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-amo-add-4.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-amo-add-5.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-compare-exchange-1.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-compare-exchange-2.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-compare-exchange-3.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-compare-exchange-4.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-compare-exchange-5.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-compare-exchange-6.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-compare-exchange-7.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c: Ditto.
>>     * gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c: Ditto.
>>
>> Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
>
> Presumably these trip up on the non-A targets that Edwin's just adding 
> to the
> testers?  They'd also trip up anyone running newlib/mulilib tests.
>
> Either way they look right to me, so
>
> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
> Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
>
> Thanks!

Committed - Thanks!

And yes, this was in response to the rv32/64imc_* targets that Edwin was 
adding to ci.

Patrick
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c
index 65a4351025d..a9edc33ff39 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-1.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* Verify that atomic op mappings match the Ztso suggested mapping.  */
 /* { dg-options "-O3" } */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 /* { dg-final { check-function-bodies "**" "" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c
index 03da6b04de0..ad843402bcc 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* Verify that atomic op mappings the Ztso suggested mapping.  */
 /* { dg-options "-O3" } */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 /* { dg-final { check-function-bodies "**" "" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c
index 695306e9d6f..bdae5bb83a6 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-3.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* Verify that atomic op mappings match the Ztso suggested mapping.  */
 /* { dg-options "-O3" } */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 /* { dg-final { check-function-bodies "**" "" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c
index e7e5ac7cc88..815a72f1e56 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-4.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* Verify that atomic op mappings match the Ztso suggested mapping.  */
 /* { dg-options "-O3" } */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 /* { dg-final { check-function-bodies "**" "" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c
index 457d0b12fbe..eda6f01096e 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-amo-add-5.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* Verify that atomic op mappings match the Ztso suggested mapping.  */
 /* { dg-options "-O3" } */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 /* { dg-final { check-function-bodies "**" "" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c
index dd6b5c24aa0..b6315c45e85 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c
index b0bafa3296e..e487184f6cf 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c
index 78cb8aa9748..e9c925f0923 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-3.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c
index 0656b84c787..6b454559633 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-4.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c
index 33d486c26ca..02c9f0ada77 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-5.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c
index f8331bfcd0d..75abd5d3dfb 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-6.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c
index b5c42e1df1d..33928c0eac4 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-compare-exchange-7.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that compare exchange mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c
index 3ba69ebc325..2a40d6b1376 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c
index 4f38ed3015c..c79380f2611 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c
index e5bcb127552..d1a94eccfa8 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-3.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c
index 316183c268b..3d65bc2f64a 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-4.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c
index fc1aa8d94f1..10354387a13 100644
--- a/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c
+++ b/gcc/testsuite/gcc.target/riscv/amo-table-ztso-subword-amo-add-5.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* Verify that subword atomic op mappings match the Ztso suggested mapping.  */
+/* { dg-add-options riscv_a } */
 /* { dg-add-options riscv_ztso } */
 /* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
 /* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */