* [PATCH][GCC] arm: remove unnecessary armv9-a multilib variant [PR104144]
@ 2022-04-08 14:48 Przemyslaw Wirkus
2022-04-12 9:44 ` Richard Earnshaw
0 siblings, 1 reply; 2+ messages in thread
From: Przemyslaw Wirkus @ 2022-04-08 14:48 UTC (permalink / raw)
To: gcc-patches; +Cc: nickc, Richard Earnshaw, Ramana Radhakrishnan, Kyrylo Tkachov
Hi,
This patch is removing unnecessary armv9-a multilib variant which was
introduced in commit 32ba7860ccaddd5219e6dae94a3d0653e124c9dd (add
armv9-a architecture to -march). Now armv9-a(+simd) multilibs point to
already existing armv8-a(+simd) ones as there are no changes between
the two.
Users will no longer require Binutils supporting `armv9-a` to build toolchain.
See multilib print below as well:
$ for v in {7..9}
do
./arm-gcc -march=armv$v-a test.c --specs=rdimon.specs -print-multi-directory
done
thumb/v7-a/nofp
thumb/v8-a/nofp
thumb/v8-a/nofp
Regtested on arm-none-eabi cross and no issues.
OK to install?
PS: If approved can I ask for someone to commit in my name pretty please?
gcc/ChangeLog:
PR target/PR104144
* config/arm/t-aprofile: Remove armv9-a multilib.
* config/arm/t-multilib: Remove armv9-a multilib.
gcc/testsuite/ChangeLog:
PR target/PR104144
* gcc.target/arm/multilib.exp: Updated tests.
--
diff --git a/gcc/config/arm/t-aprofile b/gcc/config/arm/t-aprofile
index 574951c5f0bcd6fe1a60b6b2421ae0970a4c0e48..fe2ec88d92de55813816deabd9da461c86c6c7e3 100644
--- a/gcc/config/arm/t-aprofile
+++ b/gcc/config/arm/t-aprofile
@@ -26,8 +26,8 @@
# Arch and FPU variants to build libraries with
-MULTI_ARCH_OPTS_A = march=armv7-a/march=armv7-a+fp/march=armv7-a+simd/march=armv7ve+simd/march=armv8-a/march=armv8-a+simd/march=armv9-a/march=armv9-a+simd
-MULTI_ARCH_DIRS_A = v7-a v7-a+fp v7-a+simd v7ve+simd v8-a v8-a+simd v9-a v9-a+simd
+MULTI_ARCH_OPTS_A = march=armv7-a/march=armv7-a+fp/march=armv7-a+simd/march=armv7ve+simd/march=armv8-a/march=armv8-a+simd
+MULTI_ARCH_DIRS_A = v7-a v7-a+fp v7-a+simd v7ve+simd v8-a v8-a+simd
# ARMv7-A - build nofp, fp-d16 and SIMD variants
@@ -46,11 +46,6 @@ MULTILIB_REQUIRED += mthumb/march=armv8-a/mfloat-abi=soft
MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=softfp
-# Armv9-A - build nofp and SIMD variants.
-MULTILIB_REQUIRED += mthumb/march=armv9-a/mfloat-abi=soft
-MULTILIB_REQUIRED += mthumb/march=armv9-a+simd/mfloat-abi=hard
-MULTILIB_REQUIRED += mthumb/march=armv9-a+simd/mfloat-abi=softfp
-
# Matches
# Arch Matches
@@ -135,14 +130,12 @@ MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \
march?armv8-a+simd=march?armv8.6-a$(ARCH))
# Armv9 without SIMD: map down to base architecture
-MULTILIB_MATCHES += $(foreach ARCH, $(v9_a_nosimd_variants), \
- march?armv9-a=march?armv9-a$(ARCH))
+MULTILIB_MATCHES += march?armv8-a=march?armv9-a
+# No variants without SIMD.
# Armv9 with SIMD: map down to base arch + simd
-MULTILIB_MATCHES += march?armv9-a+simd=march?armv9-a+crc+simd \
- $(foreach ARCH, $(filter-out +simd, $(v9_a_simd_variants)), \
- march?armv9-a+simd=march?armv9-a$(ARCH) \
- march?armv9-a+simd=march?armv9-a+crc$(ARCH))
+MULTILIB_MATCHES += $(foreach ARCH, $(v9_a_simd_variants), \
+ march?armv8-a+simd=march?armv9-a$(ARCH))
# Use Thumb libraries for everything.
@@ -150,13 +143,11 @@ MULTILIB_REUSE += mthumb/march.armv7-a/mfloat-abi.soft=marm/march.armv7-a/mfloa
MULTILIB_REUSE += mthumb/march.armv8-a/mfloat-abi.soft=marm/march.armv8-a/mfloat-abi.soft
-MULTILIB_REUSE += mthumb/march.armv9-a/mfloat-abi.soft=marm/march.armv9-a/mfloat-abi.soft
-
MULTILIB_REUSE += $(foreach ABI, hard softfp, \
- $(foreach ARCH, armv7-a+fp armv7-a+simd armv7ve+simd armv8-a+simd armv9-a+simd, \
+ $(foreach ARCH, armv7-a+fp armv7-a+simd armv7ve+simd armv8-a+simd, \
mthumb/march.$(ARCH)/mfloat-abi.$(ABI)=marm/march.$(ARCH)/mfloat-abi.$(ABI)))
# Softfp but no FP, use the soft-float libraries.
MULTILIB_REUSE += $(foreach MODE, arm thumb, \
- $(foreach ARCH, armv7-a armv8-a armv9-a, \
+ $(foreach ARCH, armv7-a armv8-a, \
mthumb/march.$(ARCH)/mfloat-abi.soft=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp))
diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib
index ea258b1c21091ec1d5ae671aa4cd014ce3a3952c..6bb58d39ea90f717218b7e4fa5671c65a764ffc7 100644
--- a/gcc/config/arm/t-multilib
+++ b/gcc/config/arm/t-multilib
@@ -78,7 +78,6 @@ v8_4_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
v8_5_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
v8_6_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
v8_r_nosimd_variants := +crc
-v9_a_nosimd_variants := +crc
v9_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
ifneq (,$(HAS_APROFILE))
@@ -206,14 +205,10 @@ MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \
# Armv9
MULTILIB_MATCHES += march?armv7=march?armv9-a
-MULTILIB_MATCHES += $(foreach ARCH, $(v9_a_nosimd_variants), \
- march?armv7=march?armv9-a$(ARCH))
# Armv9 with SIMD
-MULTILIB_MATCHES += march?armv7+fp=march?armv9-a+crc+simd \
- $(foreach ARCH, $(v9_a_simd_variants), \
- march?armv7+fp=march?armv9-a$(ARCH) \
- march?armv7+fp=march?armv9-a+crc$(ARCH))
+MULTILIB_MATCHES += $(foreach ARCH, $(v9_a_simd_variants), \
+ march?armv7+fp=march?armv9-a$(ARCH))
endif # Not APROFILE.
# Use Thumb libraries for everything.
diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
index ddbb443931496cb2185f6aa9b337b37cd70b5a1f..2fa648c61dafebb663969198bf7849400a7547f6 100644
--- a/gcc/testsuite/gcc.target/arm/multilib.exp
+++ b/gcc/testsuite/gcc.target/arm/multilib.exp
@@ -135,14 +135,17 @@ if {[multilib_config "aprofile"] } {
{-march=armv8.6-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
{-march=armv8.6-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
{-march=armv8.6-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
- {-march=armv9-a+crypto -mfloat-abi=soft} "thumb/v9-a/nofp"
- {-march=armv9-a+simd+crypto -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
- {-march=armv9-a+simd+crypto+nofp -mfloat-abi=softfp} "thumb/v9-a/nofp"
- {-march=armv9-a+simd+nofp+crypto -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
- {-march=armv9-a+fp16 -mfloat-abi=soft} "thumb/v9-a/nofp"
- {-march=armv9-a+simd+fp16 -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
- {-march=armv9-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v9-a/nofp"
- {-march=armv9-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
+ {-march=armv9-a+crypto -mfloat-abi=soft} "thumb/v8-a/nofp"
+ {-march=armv9-a+simd+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv9-a+simd+crypto+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
+ {-march=armv9-a+simd+nofp+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv9-a+fp16 -mfloat-abi=soft} "thumb/v8-a/nofp"
+ {-march=armv9-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv9-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
+ {-march=armv9-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv9-a+simd -mfpu=auto -mfloat-abi=hard} "thumb/v8-a+simd/hard"
+ {-march=armv9-a+simd -mfpu=auto -mfloat-abi=hard -marm} "thumb/v8-a+simd/hard"
+ {-march=armv9-a+simd -mfpu=auto -mfloat-abi=hard -mthumb} "thumb/v8-a+simd/hard"
{-mcpu=cortex-a53+crypto -mfloat-abi=hard} "thumb/v8-a+simd/hard"
{-mcpu=cortex-a53+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
{-march=armv8-a+crc -mfloat-abi=hard -mfpu=vfp} "thumb/v8-a+simd/hard"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][GCC] arm: remove unnecessary armv9-a multilib variant [PR104144]
2022-04-08 14:48 [PATCH][GCC] arm: remove unnecessary armv9-a multilib variant [PR104144] Przemyslaw Wirkus
@ 2022-04-12 9:44 ` Richard Earnshaw
0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2022-04-12 9:44 UTC (permalink / raw)
To: Przemyslaw Wirkus, gcc-patches; +Cc: Richard Earnshaw, Ramana Radhakrishnan
On 08/04/2022 15:48, Przemyslaw Wirkus via Gcc-patches wrote:
> Hi,
>
> This patch is removing unnecessary armv9-a multilib variant which was
> introduced in commit 32ba7860ccaddd5219e6dae94a3d0653e124c9dd (add
> armv9-a architecture to -march). Now armv9-a(+simd) multilibs point to
> already existing armv8-a(+simd) ones as there are no changes between
> the two.
> Users will no longer require Binutils supporting `armv9-a` to build toolchain.
>
> See multilib print below as well:
>
> $ for v in {7..9}
> do
> ./arm-gcc -march=armv$v-a test.c --specs=rdimon.specs -print-multi-directory
> done
> thumb/v7-a/nofp
> thumb/v8-a/nofp
> thumb/v8-a/nofp
>
> Regtested on arm-none-eabi cross and no issues.
> OK to install?
>
> PS: If approved can I ask for someone to commit in my name pretty please?
>
> gcc/ChangeLog:
>
> PR target/PR104144
> * config/arm/t-aprofile: Remove armv9-a multilib.
> * config/arm/t-multilib: Remove armv9-a multilib.
>
> gcc/testsuite/ChangeLog:
>
> PR target/PR104144
> * gcc.target/arm/multilib.exp: Updated tests.
>
I've tweaked the commit message as follows and applied this:
Remove the armv9-a specific multilib variants. Instead, arrange to
use either the armv8-a multilibs or the armv7-a versions, depeding on
the configuration. This eliminates the need to have a version of gas
that understands --march=armv9-a when building GCC. Very little, if
anything in the standard libraries directly uses Armv9-a features
anyway.
Also remove the +crc variant rules for Armv9-a. CRC is an implicit
part of Armv9-a, so doesn't have a explicit feature to handle it.
gcc/ChangeLog:
PR target/104144
* config/arm/t-aprofile (MULTI_ARCH_OPTS_A): Remove Armv9-a options.
(MULTI_ARCH_DIRS_A): Remove Armv9-a diretories.
(MULTILIB_REQUIRED): Don't require Armv9-a libraries.
(MULTILIB_MATCHES): Treat Armv9-a as equivalent to Armv8-a.
(MULTILIB_REUSE): Remove remap rules for Armv9-a.
* config/arm/t-multilib (v9_a_nosimd_variants): Delete.
(MULTILIB_MATCHES): Remove mappings for v9_a_nosimd_variants.
gcc/testsuite/ChangeLog:
PR target/104144
In future, please do not send patches in the body if your mailer is
using 'quoted-printable', it makes extracting the patch to apply
extremely tricky.
R.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-12 9:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 14:48 [PATCH][GCC] arm: remove unnecessary armv9-a multilib variant [PR104144] Przemyslaw Wirkus
2022-04-12 9:44 ` 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).