From: Richard Earnshaw <rearnsha@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Earnshaw <rearnsha@arm.com>
Subject: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march
Date: Mon, 13 Nov 2023 14:26:39 +0000 [thread overview]
Message-ID: <20231113142658.69039-4-rearnsha@arm.com> (raw)
In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com>
[-- Attachment #1: Type: text/plain, Size: 893 bytes --]
A number of tests in the gcc testsuite, especially for arm-specific
targets, add various flags to control the architecture. These run
into problems when the compiler is configured with -mfpu=auto if the
new architecture lacks an architectural feature that implies we have
floating-point instructions.
The testsuite makes this worse as it falls foul of this requirement in
the base architecture strings provided by target-supports.exp.
To fix this we add "+fp", or something equivalent to this, to all the
base architecture specifications. The feature will be ignored if the
float ABI is set to soft.
gcc/testsuite:
* lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok):
Add base FPU specifications to all architectures that can support
one.
---
gcc/testsuite/lib/target-supports.exp | 50 +++++++++++++--------------
1 file changed, 25 insertions(+), 25 deletions(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-arm-testsuite-avoid-hard-float-ABI-incompatibility-w.patch --]
[-- Type: text/x-patch; name="0003-arm-testsuite-avoid-hard-float-ABI-incompatibility-w.patch", Size: 3604 bytes --]
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ee173b9fb6b..7d83bd8740f 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5408,36 +5408,36 @@ foreach { armfunc armflag armdefs } {
v5t "-march=armv5t -mfloat-abi=softfp" __ARM_ARCH_5T__
v5t_arm "-march=armv5t -marm" __ARM_ARCH_5T__
v5t_thumb "-march=armv5t -mthumb -mfloat-abi=softfp" __ARM_ARCH_5T__
- v5te "-march=armv5te -mfloat-abi=softfp" __ARM_ARCH_5TE__
- v5te_arm "-march=armv5te -marm" __ARM_ARCH_5TE__
- v5te_thumb "-march=armv5te -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__
- v6 "-march=armv6 -mfloat-abi=softfp" __ARM_ARCH_6__
- v6_arm "-march=armv6 -marm" __ARM_ARCH_6__
- v6_thumb "-march=armv6 -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__
- v6k "-march=armv6k -mfloat-abi=softfp" __ARM_ARCH_6K__
- v6k_arm "-march=armv6k -marm" __ARM_ARCH_6K__
- v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__
- v6t2 "-march=armv6t2" __ARM_ARCH_6T2__
- v6z "-march=armv6z -mfloat-abi=softfp" __ARM_ARCH_6Z__
- v6z_arm "-march=armv6z -marm" __ARM_ARCH_6Z__
- v6z_thumb "-march=armv6z -mthumb -mfloat-abi=softfp" __ARM_ARCH_6Z__
+ v5te "-march=armv5te+fp -mfloat-abi=softfp" __ARM_ARCH_5TE__
+ v5te_arm "-march=armv5te+fp -marm" __ARM_ARCH_5TE__
+ v5te_thumb "-march=armv5te+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__
+ v6 "-march=armv6+fp -mfloat-abi=softfp" __ARM_ARCH_6__
+ v6_arm "-march=armv6+fp -marm" __ARM_ARCH_6__
+ v6_thumb "-march=armv6+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__
+ v6k "-march=armv6k+fp -mfloat-abi=softfp" __ARM_ARCH_6K__
+ v6k_arm "-march=armv6k+fp -marm" __ARM_ARCH_6K__
+ v6k_thumb "-march=armv6k+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__
+ v6t2 "-march=armv6t2+fp" __ARM_ARCH_6T2__
+ v6z "-march=armv6z+fp -mfloat-abi=softfp" __ARM_ARCH_6Z__
+ v6z_arm "-march=armv6z+fp -marm" __ARM_ARCH_6Z__
+ v6z_thumb "-march=armv6z+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6Z__
v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__
- v7a "-march=armv7-a" __ARM_ARCH_7A__
- v7r "-march=armv7-r" __ARM_ARCH_7R__
+ v7a "-march=armv7-a+fp" __ARM_ARCH_7A__
+ v7r "-march=armv7-r+fp" __ARM_ARCH_7R__
v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__
- v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__
- v7ve "-march=armv7ve -marm"
+ v7em "-march=armv7e-m+fp -mthumb" __ARM_ARCH_7EM__
+ v7ve "-march=armv7ve+fp -marm"
"__ARM_ARCH_7A__ && __ARM_FEATURE_IDIV"
- v8a "-march=armv8-a" __ARM_ARCH_8A__
- v8a_hard "-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard" __ARM_ARCH_8A__
- v8_1a "-march=armv8.1-a" __ARM_ARCH_8A__
- v8_2a "-march=armv8.2-a" __ARM_ARCH_8A__
- v8r "-march=armv8-r" __ARM_ARCH_8R__
+ v8a "-march=armv8-a+simd" __ARM_ARCH_8A__
+ v8a_hard "-march=armv8-a+simd -mfpu=auto -mfloat-abi=hard" __ARM_ARCH_8A__
+ v8_1a "-march=armv8.1-a+simd" __ARM_ARCH_8A__
+ v8_2a "-march=armv8.2-a+simd" __ARM_ARCH_8A__
+ v8r "-march=armv8-r+fp.sp" __ARM_ARCH_8R__
v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft"
__ARM_ARCH_8M_BASE__
- v8m_main "-march=armv8-m.main -mthumb" __ARM_ARCH_8M_MAIN__
- v8_1m_main "-march=armv8.1-m.main -mthumb" __ARM_ARCH_8M_MAIN__
- v9a "-march=armv9-a" __ARM_ARCH_9A__ } {
+ v8m_main "-march=armv8-m.main+fp -mthumb" __ARM_ARCH_8M_MAIN__
+ v8_1m_main "-march=armv8.1-m.main+fp -mthumb" __ARM_ARCH_8M_MAIN__
+ v9a "-march=armv9-a+simd" __ARM_ARCH_9A__ } {
eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
proc check_effective_target_arm_arch_FUNC_ok { } {
return [check_no_compiler_messages arm_arch_FUNC_ok assembly {
next prev parent reply other threads:[~2023-11-13 14:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 14:26 [committed 00/22] arm: testsuite: clean up some architecture-specific tests Richard Earnshaw
2023-11-13 14:26 ` [committed 01/22] arm: testsuite: correctly detect armv6t2 hardware for acle execution tests Richard Earnshaw
2023-11-14 17:01 ` Christophe Lyon
2023-11-14 17:23 ` Richard Earnshaw
2023-11-13 14:26 ` [committed 02/22] arm: testsuite: correctly detect hard_float Richard Earnshaw
2023-11-20 10:41 ` Christophe Lyon
2023-11-20 12:20 ` Richard Earnshaw
2023-11-13 14:26 ` Richard Earnshaw [this message]
2023-11-20 10:23 ` [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march Christophe Lyon
2023-11-20 12:44 ` Richard Earnshaw
2023-11-20 13:36 ` Christophe Lyon
2023-11-20 13:58 ` Richard Earnshaw
2023-11-20 14:24 ` Christophe Lyon
2023-11-20 14:39 ` Richard Earnshaw
2023-11-20 14:49 ` Richard Earnshaw
2023-11-20 14:50 ` Christophe Lyon
2023-11-20 15:58 ` Richard Earnshaw
2023-11-13 14:26 ` [committed 04/22] arm: testsuite: avoid problems with -mfpu=auto in pacbti-m-predef-11.c Richard Earnshaw
2023-11-13 14:26 ` [committed 05/22] arm: testsuite: avoid problems with -mfpu=auto in attr-crypto.c Richard Earnshaw
2023-11-13 14:26 ` [committed 06/22] arm: testsuite: avoid problems with -mfpu=auto in attr_thumb-static2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 07/22] arm: testsuite: tidy up pre-run check for g2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 08/22] arm: testsuite: improve compatibility of arm/lto/pr96939_1.c Richard Earnshaw
2023-11-13 14:26 ` [committed 09/22] arm: testsuite: tidy up pr65647-2.c pre-checks Richard Earnshaw
2023-11-13 14:26 ` [committed 10/22] arm: testsuite: improve compatibility of arm/pr78353-*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 11/22] arm: testsuite: improve compatibility of pr88648-asm-syntax-unified.c Richard Earnshaw
2023-11-13 14:26 ` [committed 12/22] arm: testsuite: improve compatibility of pragma_arch_attribute*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 13/22] arm: testsuite: improve compatibility of pragma_arch_switch_2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 14/22] arm: testsuite: modernize framework usage for arm/scd42-2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 15/22] arm: testsuite: improve compatibility of ftest-armv7m-thumb.c Richard Earnshaw
2023-11-13 14:26 ` [committed 16/22] arm: testsuite: improve compatibility of gcc.target/arm/macro_defs*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 17/22] arm: testsuite: improve compatibility of gcc.target/arm/optional_thumb-*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 18/22] arm: testsuite: improve compatibility of gcc.target/arm/pr19599.c Richard Earnshaw
2023-11-13 14:26 ` [committed 19/22] arm: testsuite: improve compatibility of gcc.target/arm/pr59575.c Richard Earnshaw
2023-11-13 14:26 ` [committed 20/22] testsuite: arm: tighten up mode-specific ISA tests Richard Earnshaw
2023-11-13 14:26 ` [committed 21/22] arm: testsuite: fix some more architecture tests Richard Earnshaw
2023-11-13 14:26 ` [committed 22/22] arm: testsuite: improve compatibility of gcc.dg/debug/pr57351.c Richard Earnshaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231113142658.69039-4-rearnsha@arm.com \
--to=rearnsha@arm.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).