* [PATCH] [testsuite, ARM] Backport to GCC 7 branch
@ 2017-09-21 8:32 Christophe Lyon
2017-09-27 10:27 ` Richard Earnshaw (lists)
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Lyon @ 2017-09-21 8:32 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 242 bytes --]
Hi,
Can I backport my patch r249639 (Add -mfloat-abi=hard to arm_neon_ok)
to the gcc-7 branch ?
It fixes a few false failures.
It applies cleanly to current trunk, and we have had it in our
linaro-7-branch for a while.
Thanks.
Christophe
[-- Attachment #2: backport-r249639.chlog.txt --]
[-- Type: text/plain, Size: 773 bytes --]
gcc/
Backport from trunk r249639.
2017-06-26 Christophe Lyon <christophe.lyon@linaro.org>
* doc/sourcebuild.texi (ARM-specific attributes): Document new
arm_neon_ok_no_float_abi effective target.
gcc/testsuite/
Backport from trunk r249639.
2017-06-26 Christophe Lyon <christophe.lyon@linaro.org>
* lib/target-supports.exp
(check_effective_target_arm_neon_ok_nocache): Add flags with
-mfloat-abi=hard. Include arm_neon.h.
(check_effective_target_arm_neon_ok_no_float_abi_nocache): New.
(check_effective_target_arm_neon_ok_no_float_abi): New.
* gcc.target/arm/lto/pr65837_0.c: Require
arm_neon_ok_no_float_abi. Add -mfpu=neon to dg-lto-options.
* gcc.target/arm/lto/pr65837-attr_0.c: Require
arm_neon_ok_no_float_abi. Remove dg-suppress-ld-options.
[-- Attachment #3: backport-r249639.patch.txt --]
[-- Type: text/plain, Size: 3745 bytes --]
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 84d9a22..c7bb4b7 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1570,6 +1570,12 @@
ARM Target supports @code{-mfpu=neon -mfloat-abi=softfp} or compatible
options. Some multilibs may be incompatible with these options.
+@item arm_neon_ok_no_float_abi
+@anchor{arm_neon_ok_no_float_abi}
+ARM Target supports NEON with @code{-mfpu=neon}, but without any
+-mfloat-abi= option. Some multilibs may be incompatible with this
+option.
+
@item arm_neonv2_ok
@anchor{arm_neonv2_ok}
ARM Target supports @code{-mfpu=neon-vfpv4 -mfloat-abi=softfp} or compatible
diff --git a/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c b/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c
index ebc5f44..f00480b 100644
--- a/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c
+++ b/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c
@@ -1,6 +1,7 @@
/* { dg-lto-do run } */
/* { dg-require-effective-target arm_neon_hw } */
-/* { dg-lto-options {{-flto}} } */
+/* { dg-require-effective-target arm_neon_ok_no_float_abi } */
+/* { dg-lto-options {{-flto -mfpu=neon}} } */
#include "arm_neon.h"
diff --git a/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c b/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c
index 6b2def9..5d7cea7 100644
--- a/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c
+++ b/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c
@@ -1,7 +1,7 @@
/* { dg-lto-do run } */
/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-require-effective-target arm_neon_ok_no_float_abi } */
/* { dg-lto-options {{-flto -mfpu=neon}} } */
-/* { dg-suppress-ld-options {-mfpu=neon} } */
#include "arm_neon.h"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 57caec7..d20e7d3 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3428,8 +3428,9 @@
global et_arm_neon_flags
set et_arm_neon_flags ""
if { [check_effective_target_arm32] } {
- foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -march=armv7-a"} {
+ foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -march=armv7-a" "-mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard -march=armv7-a"} {
if { [check_no_compiler_messages_nocache arm_neon_ok object {
+ #include <arm_neon.h>
int dummy;
#ifndef __ARM_NEON__
#error not NEON
@@ -3454,6 +3455,38 @@
check_effective_target_arm_neon_ok_nocache]
}
+# Return 1 if this is an ARM target supporting -mfpu=neon without any
+# -mfloat-abi= option. Useful in tests where add_options is not
+# supported (such as lto tests).
+
+proc check_effective_target_arm_neon_ok_no_float_abi_nocache { } {
+ if { [check_effective_target_arm32] } {
+ foreach flags {"-mfpu=neon"} {
+ if { [check_no_compiler_messages_nocache arm_neon_ok_no_float_abi object {
+ #include <arm_neon.h>
+ int dummy;
+ #ifndef __ARM_NEON__
+ #error not NEON
+ #endif
+ /* Avoid the case where a test adds -mfpu=neon, but the toolchain is
+ configured for -mcpu=arm926ej-s, for example. */
+ #if __ARM_ARCH < 7 || __ARM_ARCH_PROFILE == 'M'
+ #error Architecture does not support NEON.
+ #endif
+ } "$flags"] } {
+ return 1
+ }
+ }
+ }
+
+ return 0
+}
+
+proc check_effective_target_arm_neon_ok_no_float_abi { } {
+ return [check_cached_effective_target arm_neon_ok_no_float_abi \
+ check_effective_target_arm_neon_ok_no_float_abi_nocache]
+}
+
proc check_effective_target_arm_crc_ok_nocache { } {
global et_arm_crc_flags
set et_arm_crc_flags "-march=armv8-a+crc"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [testsuite, ARM] Backport to GCC 7 branch
2017-09-21 8:32 [PATCH] [testsuite, ARM] Backport to GCC 7 branch Christophe Lyon
@ 2017-09-27 10:27 ` Richard Earnshaw (lists)
0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw (lists) @ 2017-09-27 10:27 UTC (permalink / raw)
To: Christophe Lyon, gcc-patches
On 21/09/17 09:32, Christophe Lyon wrote:
> Hi,
>
> Can I backport my patch r249639 (Add -mfloat-abi=hard to arm_neon_ok)
> to the gcc-7 branch ?
> It fixes a few false failures.
>
> It applies cleanly to current trunk, and we have had it in our
> linaro-7-branch for a while.
>
OK.
R.
> Thanks.
>
> Christophe
>
>
> backport-r249639.chlog.txt
>
>
> gcc/
> Backport from trunk r249639.
> 2017-06-26 Christophe Lyon <christophe.lyon@linaro.org>
>
> * doc/sourcebuild.texi (ARM-specific attributes): Document new
> arm_neon_ok_no_float_abi effective target.
>
> gcc/testsuite/
> Backport from trunk r249639.
> 2017-06-26 Christophe Lyon <christophe.lyon@linaro.org>
>
> * lib/target-supports.exp
> (check_effective_target_arm_neon_ok_nocache): Add flags with
> -mfloat-abi=hard. Include arm_neon.h.
> (check_effective_target_arm_neon_ok_no_float_abi_nocache): New.
> (check_effective_target_arm_neon_ok_no_float_abi): New.
> * gcc.target/arm/lto/pr65837_0.c: Require
> arm_neon_ok_no_float_abi. Add -mfpu=neon to dg-lto-options.
> * gcc.target/arm/lto/pr65837-attr_0.c: Require
> arm_neon_ok_no_float_abi. Remove dg-suppress-ld-options.
>
>
> backport-r249639.patch.txt
>
>
> diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
> index 84d9a22..c7bb4b7 100644
> --- a/gcc/doc/sourcebuild.texi
> +++ b/gcc/doc/sourcebuild.texi
> @@ -1570,6 +1570,12 @@
> ARM Target supports @code{-mfpu=neon -mfloat-abi=softfp} or compatible
> options. Some multilibs may be incompatible with these options.
>
> +@item arm_neon_ok_no_float_abi
> +@anchor{arm_neon_ok_no_float_abi}
> +ARM Target supports NEON with @code{-mfpu=neon}, but without any
> +-mfloat-abi= option. Some multilibs may be incompatible with this
> +option.
> +
> @item arm_neonv2_ok
> @anchor{arm_neonv2_ok}
> ARM Target supports @code{-mfpu=neon-vfpv4 -mfloat-abi=softfp} or compatible
> diff --git a/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c b/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c
> index ebc5f44..f00480b 100644
> --- a/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c
> +++ b/gcc/testsuite/gcc.target/arm/lto/pr65837-attr_0.c
> @@ -1,6 +1,7 @@
> /* { dg-lto-do run } */
> /* { dg-require-effective-target arm_neon_hw } */
> -/* { dg-lto-options {{-flto}} } */
> +/* { dg-require-effective-target arm_neon_ok_no_float_abi } */
> +/* { dg-lto-options {{-flto -mfpu=neon}} } */
>
> #include "arm_neon.h"
>
> diff --git a/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c b/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c
> index 6b2def9..5d7cea7 100644
> --- a/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c
> +++ b/gcc/testsuite/gcc.target/arm/lto/pr65837_0.c
> @@ -1,7 +1,7 @@
> /* { dg-lto-do run } */
> /* { dg-require-effective-target arm_neon_hw } */
> +/* { dg-require-effective-target arm_neon_ok_no_float_abi } */
> /* { dg-lto-options {{-flto -mfpu=neon}} } */
> -/* { dg-suppress-ld-options {-mfpu=neon} } */
>
> #include "arm_neon.h"
>
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 57caec7..d20e7d3 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -3428,8 +3428,9 @@
> global et_arm_neon_flags
> set et_arm_neon_flags ""
> if { [check_effective_target_arm32] } {
> - foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -march=armv7-a"} {
> + foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -march=armv7-a" "-mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard -march=armv7-a"} {
> if { [check_no_compiler_messages_nocache arm_neon_ok object {
> + #include <arm_neon.h>
> int dummy;
> #ifndef __ARM_NEON__
> #error not NEON
> @@ -3454,6 +3455,38 @@
> check_effective_target_arm_neon_ok_nocache]
> }
>
> +# Return 1 if this is an ARM target supporting -mfpu=neon without any
> +# -mfloat-abi= option. Useful in tests where add_options is not
> +# supported (such as lto tests).
> +
> +proc check_effective_target_arm_neon_ok_no_float_abi_nocache { } {
> + if { [check_effective_target_arm32] } {
> + foreach flags {"-mfpu=neon"} {
> + if { [check_no_compiler_messages_nocache arm_neon_ok_no_float_abi object {
> + #include <arm_neon.h>
> + int dummy;
> + #ifndef __ARM_NEON__
> + #error not NEON
> + #endif
> + /* Avoid the case where a test adds -mfpu=neon, but the toolchain is
> + configured for -mcpu=arm926ej-s, for example. */
> + #if __ARM_ARCH < 7 || __ARM_ARCH_PROFILE == 'M'
> + #error Architecture does not support NEON.
> + #endif
> + } "$flags"] } {
> + return 1
> + }
> + }
> + }
> +
> + return 0
> +}
> +
> +proc check_effective_target_arm_neon_ok_no_float_abi { } {
> + return [check_cached_effective_target arm_neon_ok_no_float_abi \
> + check_effective_target_arm_neon_ok_no_float_abi_nocache]
> +}
> +
> proc check_effective_target_arm_crc_ok_nocache { } {
> global et_arm_crc_flags
> set et_arm_crc_flags "-march=armv8-a+crc"
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-27 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-21 8:32 [PATCH] [testsuite, ARM] Backport to GCC 7 branch Christophe Lyon
2017-09-27 10:27 ` Richard Earnshaw (lists)
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).