arm: remove unnecessary armv9-a multilib variant [PR104144]
authorPrzemyslaw Wirkus <Przemyslaw.Wirkus@arm.com>
Mon, 11 Apr 2022 12:14:01 +0000 (13:14 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Tue, 12 Apr 2022 09:40:23 +0000 (10:40 +0100)
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
* gcc.target/arm/multilib.exp: Updated tests.

gcc/config/arm/t-aprofile
gcc/config/arm/t-multilib
gcc/testsuite/gcc.target/arm/multilib.exp

index 574951c..fe2ec88 100644 (file)
@@ -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))
index ea258b1..6bb58d3 100644 (file)
@@ -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.
index ddbb443..2fa648c 100644 (file)
@@ -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"