From 9029d3424fac933a8bd5fb6ea63583f7812b6ef6 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 22 Feb 2018 16:31:56 +0000 Subject: [PATCH] [ARM] Multilib mapping for Armv8-R Due to there being no multilib mapping for Armv8-R, default multilib builts for -march=armv4t with softfloat floating-point arithmetic is being used. This patch maps it instead to the existing Armv7 multilibs. Note that mapping for single-precision Armv8-R has been left out due to there being no Arm implementation of that architecture variant. 2018-02-22 Thomas Preud'homme gcc/ * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs. gcc/testsuite/ * gcc.target/arm/multilib.exp: Add tests for Armv8-R multilib mappings. From-SVN: r257904 --- gcc/ChangeLog | 4 ++++ gcc/config/arm/t-multilib | 9 +++++++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/arm/multilib.exp | 19 +++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7503cc5b61f..4643dd12eb2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-02-22 Thomas Preud'homme + + * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs. + 2018-02-22 Martin Liska PR driver/83193 diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib index 2f790097670..3d0c824b4ec 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 := +crc ifneq (,$(HAS_APROFILE)) include $(srcdir)/config/arm/t-aprofile @@ -105,6 +106,14 @@ MULTILIB_MATCHES += march?armv7+fp=march?armv7-r+fp+idiv MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \ march?armv5te+fp=march?$(ARCH)+fp) +# Map v8-r down onto common v7 code. +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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 48826c7d35c..4e40a1f78e2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-02-22 Thomas Preud'homme + + * gcc.target/arm/multilib.exp: Add tests for Armv8-R multilib mappings. + 2018-02-22 Marek Polacek PR c++/84493 diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp index c54bca85fd9..04da2b0a20e 100644 --- a/gcc/testsuite/gcc.target/arm/multilib.exp +++ b/gcc/testsuite/gcc.target/arm/multilib.exp @@ -422,6 +422,7 @@ if {[multilib_config "rmprofile"] } { {-mcpu=cortex-m23 -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.base/nofp" {-mcpu=cortex-m33 -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.main/nofp" {-mcpu=cortex-m7+nofp.dp -mfpu=auto -mfloat-abi=soft} "thumb/v7e-m/nofp" + {-mcpu=cortex-r52 -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp" {-mcpu=cortex-m0 -mfpu=vfpv3xd -mfloat-abi=soft} "thumb/v6-m/nofp" {-mcpu=cortex-m1 -mfpu=vfpv3xd -mfloat-abi=soft} "thumb/v6-m/nofp" {-mcpu=cortex-m3 -mfpu=vfpv3xd -mfloat-abi=soft} "thumb/v7-m/nofp" @@ -466,6 +467,7 @@ if {[multilib_config "rmprofile"] } { {-mcpu=cortex-m7 -mfpu=auto -mfloat-abi=hard} "thumb/v7e-m+dp/hard" {-mcpu=cortex-m33 -mfpu=auto -mfloat-abi=hard} "thumb/v8-m.main+fp/hard" {-mcpu=cortex-m7+nofp.dp -mfpu=auto -mfloat-abi=hard} "thumb/v7e-m+fp/hard" + {-mcpu=cortex-r52 -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard" {-mcpu=cortex-m4 -mfpu=vfpv3xd -mfloat-abi=hard} "thumb/v7e-m+fp/hard" {-mcpu=cortex-m7 -mfpu=vfpv3xd -mfloat-abi=hard} "thumb/v7e-m+fp/hard" {-mcpu=cortex-m33 -mfpu=vfpv3xd -mfloat-abi=hard} "thumb/v8-m.main+fp/hard" @@ -494,6 +496,7 @@ if {[multilib_config "rmprofile"] } { {-mcpu=cortex-m23 -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.base/nofp" {-mcpu=cortex-m33 -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.main+fp/softfp" {-mcpu=cortex-m7+nofp.dp -mfpu=auto -mfloat-abi=softfp} "thumb/v7e-m+fp/softfp" + {-mcpu=cortex-r52 -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp" {-mcpu=cortex-m0 -mfpu=vfpv3xd -mfloat-abi=softfp} "thumb/v6-m/nofp" {-mcpu=cortex-m1 -mfpu=vfpv3xd -mfloat-abi=softfp} "thumb/v6-m/nofp" {-mcpu=cortex-m3 -mfpu=vfpv3xd -mfloat-abi=softfp} "thumb/v7-m/nofp" @@ -545,6 +548,12 @@ if {[multilib_config "rmprofile"] } { {-march=armv8-m.main+fp.dp -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.main/nofp" {-march=armv8-m.main+fp+dsp -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.main/nofp" {-march=armv8-m.main+fp.dp+dsp -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.main/nofp" + {-march=armv8-r -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp" + {-march=armv8-r+crc -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp" + {-march=armv8-r+simd -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp" + {-march=armv8-r+crc+simd -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp" + {-march=armv8-r+crypto -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp" + {-march=armv8-r+crc+crypto -mfpu=auto -mfloat-abi=soft} "thumb/v7/nofp" {-march=armv6-m -mfpu=vfpv3xd -mfloat-abi=soft} "thumb/v6-m/nofp" {-march=armv7-m -mfpu=vfpv3xd -mfloat-abi=soft} "thumb/v7-m/nofp" {-march=armv7e-m -mfpu=vfpv3xd -mfloat-abi=soft} "thumb/v7e-m/nofp" @@ -606,6 +615,10 @@ if {[multilib_config "rmprofile"] } { {-march=armv8-m.main+fp.dp -mfpu=auto -mfloat-abi=hard} "thumb/v8-m.main+dp/hard" {-march=armv8-m.main+fp+dsp -mfpu=auto -mfloat-abi=hard} "thumb/v8-m.main+fp/hard" {-march=armv8-m.main+fp.dp+dsp -mfpu=auto -mfloat-abi=hard} "thumb/v8-m.main+dp/hard" + {-march=armv8-r+simd -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard" + {-march=armv8-r+crc+simd -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard" + {-march=armv8-r+crypto -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard" + {-march=armv8-r+crc+crypto -mfpu=auto -mfloat-abi=hard} "thumb/v7+fp/hard" {-march=armv7e-m -mfpu=vfpv3xd -mfloat-abi=hard} "thumb/v7e-m+fp/hard" {-march=armv8-m.main -mfpu=vfpv3xd -mfloat-abi=hard} "thumb/v8-m.main+fp/hard" {-march=armv7e-m+fp -mfpu=vfpv3xd -mfloat-abi=hard} "thumb/v7e-m+fp/hard" @@ -657,6 +670,12 @@ if {[multilib_config "rmprofile"] } { {-march=armv8-m.main+fp.dp -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.main+dp/softfp" {-march=armv8-m.main+fp+dsp -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.main+fp/softfp" {-march=armv8-m.main+fp.dp+dsp -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.main+dp/softfp" + {-march=armv8-r -mfpu=auto -mfloat-abi=softfp} "thumb/v7/nofp" + {-march=armv8-r+crc -mfpu=auto -mfloat-abi=softfp} "thumb/v7/nofp" + {-march=armv8-r+simd -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp" + {-march=armv8-r+crc+simd -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp" + {-march=armv8-r+crypto -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp" + {-march=armv8-r+crc+crypto -mfpu=auto -mfloat-abi=softfp} "thumb/v7+fp/softfp" {-march=armv6-m -mfpu=vfpv3xd -mfloat-abi=softfp} "thumb/v6-m/nofp" {-march=armv7-m -mfpu=vfpv3xd -mfloat-abi=softfp} "thumb/v7-m/nofp" {-march=armv7e-m -mfpu=vfpv3xd -mfloat-abi=softfp} "thumb/v7e-m+fp/softfp" -- 2.30.2