From: Mihail Ionescu Date: Tue, 17 Mar 2020 12:39:39 +0000 (+0000) Subject: [GCC][PATCH][ARM] Add multilib mapping for Armv8.1-M+MVE with -mfloat-abi=hard X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f582ca0fd70c5de7f1bcb532241d58f9e7f0090a;p=gcc.git [GCC][PATCH][ARM] Add multilib mapping for Armv8.1-M+MVE with -mfloat-abi=hard This patch adds a new multilib for armv8.1-m.main+mve with hard float abi. For armv8.1-m.main+mve soft and softfp, the v8-M multilibs will be reused. The following mappings are also updated: "-mfloat-abi=hard -march=armv8.1-m.main+mve.fp -> armv8-m.main+fp/hard" "-mfloat-abi=softfp -march=armv8.1-m.main+mve.fp -> armv8-m.main+fp/softfp" "-mfloat-abi=soft -march=armv8.1-m.main+mve.fp -> armv8-m.main/nofp" gcc/ChangeLog: 2020-03-17 Mihail Ionescu * config/arm/t-rmprofile: create new multilib for armv8.1-m.main+mve hard float and reuse v8-m.main ones for v8.1-m.main+mve . gcc/testsuite/ChangeLog: 2020-03-17 Mihail Ionescu * gcc.target/arm/multilib.exp: Add new v8.1-M entry. libgcc/ChangLog: 2020-03-17 Mihail Ionescu * config/arm/t-arm: Do not compile cmse_nonsecure_call.S for v8.1-m. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c51606cf53e..42bad0c7a00 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-03-17 Mihail Ionescu + + * config/arm/t-rmprofile: create new multilib for + armv8.1-m.main+mve hard float and reuse v8-m.main ones for + v8.1-m.main+mve. + 2020-03-17 Jakub Jelinek PR tree-optimization/94015 diff --git a/gcc/config/arm/t-rmprofile b/gcc/config/arm/t-rmprofile index 0fb3084c8b2..16e368f25cc 100644 --- a/gcc/config/arm/t-rmprofile +++ b/gcc/config/arm/t-rmprofile @@ -27,8 +27,8 @@ # Arch and FPU variants to build libraries with -MULTI_ARCH_OPTS_RM = march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp -MULTI_ARCH_DIRS_RM = v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp +MULTI_ARCH_OPTS_RM = march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp/march=armv8.1-m.main+mve +MULTI_ARCH_DIRS_RM = v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp v8.1-m.main+mve # Base M-profile (no fp) MULTILIB_REQUIRED += mthumb/march=armv6s-m/mfloat-abi=soft @@ -48,8 +48,7 @@ MULTILIB_REQUIRED += mthumb/march=armv8-m.main+fp/mfloat-abi=hard MULTILIB_REQUIRED += mthumb/march=armv8-m.main+fp/mfloat-abi=softfp MULTILIB_REQUIRED += mthumb/march=armv8-m.main+fp.dp/mfloat-abi=hard MULTILIB_REQUIRED += mthumb/march=armv8-m.main+fp.dp/mfloat-abi=softfp - - +MULTILIB_REQUIRED += mthumb/march=armv8.1-m.main+mve/mfloat-abi=hard # Arch Matches MULTILIB_MATCHES += march?armv6s-m=march?armv6-m @@ -66,12 +65,14 @@ MULTILIB_MATCHES += march?armv7e-m+fp=march?armv7e-m+fpv5 MULTILIB_REUSE += $(foreach ARCH, armv6s-m armv7-m armv7e-m armv8-m\.base armv8-m\.main, \ mthumb/march.$(ARCH)/mfloat-abi.soft=mthumb/march.$(ARCH)/mfloat-abi.softfp) + # Map v8.1-M to v8-M. MULTILIB_MATCHES += march?armv8-m.main=march?armv8.1-m.main MULTILIB_MATCHES += march?armv8-m.main=march?armv8.1-m.main+dsp -MULTILIB_MATCHES += march?armv8-m.main=march?armv8.1-m.main+mve +MULTILIB_REUSE += mthumb/march.armv8-m\.main/mfloat-abi.soft=mthumb/march.armv8\.1-m\.main+mve/mfloat-abi.soft +MULTILIB_REUSE += mthumb/march.armv8-m\.main/mfloat-abi.soft=mthumb/march.armv8\.1-m\.main+mve/mfloat-abi.softfp -v8_1m_sp_variants = +fp +dsp+fp +mve.fp +v8_1m_sp_variants = +fp +dsp+fp +mve.fp +fp+mve v8_1m_dp_variants = +fp.dp +dsp+fp.dp +fp.dp+mve +fp.dp+mve.fp # Map all v8.1-m.main FP sp variants down to v8-m. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a389a6a1a14..acf982f7b15 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-03-17 Mihail Ionescu + + * gcc.target/arm/multilib.exp: Add new v8.1-M entry. + 2020-03-17 Jakub Jelinek PR tree-optimization/94015 diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp index 17111ee5257..f67a92a9201 100644 --- a/gcc/testsuite/gcc.target/arm/multilib.exp +++ b/gcc/testsuite/gcc.target/arm/multilib.exp @@ -814,6 +814,9 @@ if {[multilib_config "rmprofile"] } { {-march=armv8.1-m.main+mve.fp -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.main/nofp" {-march=armv8.1-m.main+mve -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.main/nofp" {-march=armv8.1-m.main+mve.fp -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.main+fp/softfp" + {-march=armv8.1-m.main+mve -mfpu=auto -mfloat-abi=hard} "thumb/v8.1-m.main+mve/hard" + {-march=armv8.1-m.main+mve+fp -mfpu=auto -mfloat-abi=hard} "thumb/v8-m.main+fp/hard" + {-march=armv8.1-m.main+mve+fp -mfpu=auto -mfloat-abi=softfp} "thumb/v8-m.main+fp/softfp" {-march=armv8.1-m.main+mve.fp -mfpu=auto -mfloat-abi=hard} "thumb/v8-m.main+fp/hard" {-march=armv8.1-m.main+mve+fp.dp -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.main/nofp" {-march=armv8.1-m.main+mve.fp+fp.dp -mfpu=auto -mfloat-abi=soft} "thumb/v8-m.main/nofp" diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 92d5f299e15..836a641326b 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2020-03-17 Mihail Ionescu + + * config/arm/t-arm: Do not compile cmse_nonsecure_call.S for v8.1-m. + 2020-03-04 Andreas Krebbel * config.host: Include the new makefile fragment. diff --git a/libgcc/config/arm/t-arm b/libgcc/config/arm/t-arm index f2b927f3686..364f40ebe7f 100644 --- a/libgcc/config/arm/t-arm +++ b/libgcc/config/arm/t-arm @@ -3,11 +3,13 @@ LIB1ASMFUNCS = _thumb1_case_sqi _thumb1_case_uqi _thumb1_case_shi \ _thumb1_case_uhi _thumb1_case_si _speculation_barrier HAVE_CMSE:=$(findstring __ARM_FEATURE_CMSE,$(shell $(gcc_compile_bare) -dM -E - /dev/null 2>/dev/null; echo $?),0) CMSE_OPTS:=-mcmse endif ifdef HAVE_CMSE +ifndef HAVE_V81M libgcc-objects += cmse.o cmse_nonsecure_call.o cmse.o: $(srcdir)/config/arm/cmse.c @@ -15,3 +17,4 @@ cmse.o: $(srcdir)/config/arm/cmse.c cmse_nonsecure_call.o: $(srcdir)/config/arm/cmse_nonsecure_call.S $(gcc_compile) -c $< endif +endif