Hi Thomas,

On 13/02/18 10:24, Thomas Preudhomme wrote:
Hi,

Due to there being no multilib mapping for Armv8-R, default multilib
targeting -march=armv4t with softfloat floating-point arithmetic is
being used. This patch maps it instead to the existing Armv7 multilibs.
Note that since there is no single-precision multilib compatible with
R profile, -march=armv8-r+fp.sp is mapped to -march=armv7 ie. Armv7
with softfloat floating-point.


Thanks for doing this.

Changelog entry is as follows:

*** gcc/ChangeLog ***

2018-02-12  Thomas Preud'homme <thomas.preudho...@arm.com>

        * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.

Testing:

Ran -print-multi-directory for all combinations of extensions one can
pass to -march=armv8-r (including no extension but only considering a
single ordering of extension). All gave the expected result. Details in
appendix.

Is this ok for stage4?

Best regards,

Thomas

Appendix: output of -print-multi-directory for all extensions available
to -march=armv8-r


Can you please add a representative subset of these as tests to 
gcc.target/arm/multilib.exp.
That way we can have the peace of mind that they have sane mappings as we go 
forward.

<snip, thanks for the results>

diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib
index 
2f790097670e1bf81b56b069a6b1582763aab6e9..cd5927a7c9ec053b4d5b9725f7b30daeca3b1aa3
 100644
--- a/gcc/config/arm/t-multilib
+++ b/gcc/config/arm/t-multilib
@@ -70,6 +70,7 @@ v8_a_simd_variants    := $(call all_feat_combs, simd crypto)
 v8_1_a_simd_variants   := $(call all_feat_combs, simd crypto)
 v8_2_a_simd_variants   := $(call all_feat_combs, simd fp16 fp16fml crypto 
dotprod)
 v8_4_a_simd_variants   := $(call all_feat_combs, simd fp16 crypto)
+v8_r_nosimd_variants   := $(call all_feat_combs, crc fp.sp)
ifneq (,$(HAS_APROFILE))
 include $(srcdir)/config/arm/t-aprofile
@@ -105,6 +106,20 @@ MULTILIB_MATCHES   += march?armv7+fp=march?armv7-r+fp+idiv
MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \
                             march?armv5te+fp=march?$(ARCH)+fp)
+#
+# Armv8-r: map down onto common v7 code.


Please use Armv8-R.



 +# Note 1: there is no single-precision armv7 multilib so +fp.sp is mapped
+# down to softfloat armv7 (second MULTILIB_MATCHES).
+# Note 2: +fp.sp being a subset of +simd and +crypto, there is no need to
+# consider the combination of +fp.sp with a simd extension since matching
+# is run after canonicalization
+MULTILIB_MATCHES       += march?armv7=march?armv8-r
+MULTILIB_MATCHES       += $(foreach ARCH, $(v8_r_nosimd_variants), \
+                            march?armv7=march?armv8-r$(ARCH))
+MULTILIB_MATCHES       += $(foreach ARCH,+simd +crypto, \
+                            march?armv7+fp=march?armv8-r$(ARCH) \
+                            march?armv7+fp=march?armv8-r+crc$(ARCH))
+
ifeq (,$(HAS_APROFILE))
 # Map all v7-a


Reply via email to