public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite/arm: Improve unsigned-float.c
@ 2021-04-22 13:32 Christophe Lyon
  2021-04-30 14:21 ` Christophe Lyon
  2021-05-11 12:00 ` Richard Earnshaw
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe Lyon @ 2021-04-22 13:32 UTC (permalink / raw)
  To: gcc-patches

The test requires an FPU, so use -march=armv7-a+fp -mfpu=auto instead
of -march=armv7-a.

We also remove dg-require-effective-target arm_fp_ok, but keep
dg-add-options arm_fp: this enables the test to pass on arm-eabi
configured with default cpu/fpu/mode.

dg-require-effective-target arm_fp_ok fails on such a configuration
for lack of FPU, since dg-options are not taken into account by
dg-require-effective-target.

Add -march=armv7-a+fp -mfpu=auto is sufficient for arm_fp options to
be acceptable.

This enables the test to pass on all the arm-eabi configurations I'm
testing, as well as arm-linux-gnueabi when forcing -march=armv5t.

2021-04-22  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* gcc.target/arm/unsigned-float.c: Remove arm_fp_ok, adjust
	dg-options.
---
 gcc/testsuite/gcc.target/arm/unsigned-float.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/unsigned-float.c b/gcc/testsuite/gcc.target/arm/unsigned-float.c
index ad589d9..ea3abc7 100644
--- a/gcc/testsuite/gcc.target/arm/unsigned-float.c
+++ b/gcc/testsuite/gcc.target/arm/unsigned-float.c
@@ -1,8 +1,8 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_fp_ok } */
-/* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */
 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
-/* { dg-options "-march=armv7-a -O1" } */
+/* { dg-options "-march=armv7-a+fp -mfpu=auto -O1" } */
+/* Do not require arm_ok effective target to avoid skipping on arm-eabi with
+   default configure options.  */
 /* { dg-add-options arm_fp } */
 
 
-- 
2.7.4


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

* Re: [PATCH] testsuite/arm: Improve unsigned-float.c
  2021-04-22 13:32 [PATCH] testsuite/arm: Improve unsigned-float.c Christophe Lyon
@ 2021-04-30 14:21 ` Christophe Lyon
  2021-05-11 12:00 ` Richard Earnshaw
  1 sibling, 0 replies; 3+ messages in thread
From: Christophe Lyon @ 2021-04-30 14:21 UTC (permalink / raw)
  To: gcc Patches

ping?

On Thu, 22 Apr 2021 at 15:32, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
> The test requires an FPU, so use -march=armv7-a+fp -mfpu=auto instead
> of -march=armv7-a.
>
> We also remove dg-require-effective-target arm_fp_ok, but keep
> dg-add-options arm_fp: this enables the test to pass on arm-eabi
> configured with default cpu/fpu/mode.
>
> dg-require-effective-target arm_fp_ok fails on such a configuration
> for lack of FPU, since dg-options are not taken into account by
> dg-require-effective-target.
>
> Add -march=armv7-a+fp -mfpu=auto is sufficient for arm_fp options to
> be acceptable.
>
> This enables the test to pass on all the arm-eabi configurations I'm
> testing, as well as arm-linux-gnueabi when forcing -march=armv5t.
>
> 2021-04-22  Christophe Lyon  <christophe.lyon@linaro.org>
>
>         gcc/testsuite/
>         * gcc.target/arm/unsigned-float.c: Remove arm_fp_ok, adjust
>         dg-options.
> ---
>  gcc/testsuite/gcc.target/arm/unsigned-float.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/arm/unsigned-float.c b/gcc/testsuite/gcc.target/arm/unsigned-float.c
> index ad589d9..ea3abc7 100644
> --- a/gcc/testsuite/gcc.target/arm/unsigned-float.c
> +++ b/gcc/testsuite/gcc.target/arm/unsigned-float.c
> @@ -1,8 +1,8 @@
>  /* { dg-do compile } */
> -/* { dg-require-effective-target arm_fp_ok } */
> -/* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */
>  /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
> -/* { dg-options "-march=armv7-a -O1" } */
> +/* { dg-options "-march=armv7-a+fp -mfpu=auto -O1" } */
> +/* Do not require arm_ok effective target to avoid skipping on arm-eabi with
> +   default configure options.  */
>  /* { dg-add-options arm_fp } */
>
>
> --
> 2.7.4
>

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

* Re: [PATCH] testsuite/arm: Improve unsigned-float.c
  2021-04-22 13:32 [PATCH] testsuite/arm: Improve unsigned-float.c Christophe Lyon
  2021-04-30 14:21 ` Christophe Lyon
@ 2021-05-11 12:00 ` Richard Earnshaw
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Earnshaw @ 2021-05-11 12:00 UTC (permalink / raw)
  To: Christophe Lyon, gcc-patches



On 22/04/2021 14:32, Christophe Lyon via Gcc-patches wrote:
> The test requires an FPU, so use -march=armv7-a+fp -mfpu=auto instead
> of -march=armv7-a.
> 
> We also remove dg-require-effective-target arm_fp_ok, but keep
> dg-add-options arm_fp: this enables the test to pass on arm-eabi
> configured with default cpu/fpu/mode.
> 
> dg-require-effective-target arm_fp_ok fails on such a configuration
> for lack of FPU, since dg-options are not taken into account by
> dg-require-effective-target.
> 
> Add -march=armv7-a+fp -mfpu=auto is sufficient for arm_fp options to
> be acceptable.
> 
> This enables the test to pass on all the arm-eabi configurations I'm
> testing, as well as arm-linux-gnueabi when forcing -march=armv5t.
> 
> 2021-04-22  Christophe Lyon  <christophe.lyon@linaro.org>
> 
> 	gcc/testsuite/
> 	* gcc.target/arm/unsigned-float.c: Remove arm_fp_ok, adjust
> 	dg-options.
> ---
>   gcc/testsuite/gcc.target/arm/unsigned-float.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/arm/unsigned-float.c b/gcc/testsuite/gcc.target/arm/unsigned-float.c
> index ad589d9..ea3abc7 100644
> --- a/gcc/testsuite/gcc.target/arm/unsigned-float.c
> +++ b/gcc/testsuite/gcc.target/arm/unsigned-float.c
> @@ -1,8 +1,8 @@
>   /* { dg-do compile } */
> -/* { dg-require-effective-target arm_fp_ok } */
> -/* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */
>   /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
> -/* { dg-options "-march=armv7-a -O1" } */
> +/* { dg-options "-march=armv7-a+fp -mfpu=auto -O1" } */
> +/* Do not require arm_ok effective target to avoid skipping on arm-eabi with
> +   default configure options.  */
>   /* { dg-add-options arm_fp } */
>   
>   

OK.
R.

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

end of thread, other threads:[~2021-05-13 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 13:32 [PATCH] testsuite/arm: Improve unsigned-float.c Christophe Lyon
2021-04-30 14:21 ` Christophe Lyon
2021-05-11 12:00 ` Richard Earnshaw

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).