aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihail Ionescu <mihail.ionescu@arm.com>2020-01-15 11:49:32 +0000
committerMihail Ionescu <mihail.ionescu@arm.com>2020-01-16 15:12:14 +0000
commit4747e2ccec94dc37f32201b884f574755cbb9ca8 (patch)
treed4d29a4e28115c58ab3dc5feb391baf752b5fb88
parenta464ffc2156a746d472fc2923d38324bdd06965e (diff)
downloadgcc-4747e2ccec94dc37f32201b884f574755cbb9ca8.zip
gcc-4747e2ccec94dc37f32201b884f574755cbb9ca8.tar.gz
gcc-4747e2ccec94dc37f32201b884f574755cbb9ca8.tar.bz2
[PATCH, GCC/ARM, 10/10] Enable -mcmse
The patch is straightforward: it redefines ARMv8_1m_main as having the same features as ARMv8m_main (and thus as having the cmse feature) with the extra features represented by armv8_1m_main. It also removes the error for using -mcmse on Armv8.1-M Mainline. *** gcc/ChangeLog *** 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com> 2020-01-16 Thomas Preud'homme <thomas.preudhomme@arm.com> * config/arm/arm-cpus.in (ARMv8_1m_main): Redefine as an extension to Armv8-M Mainline. * config/arm/arm.c (arm_options_perform_arch_sanity_checks): Remove error for using -mcmse when targeting Armv8.1-M Mainline.
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/arm/arm-cpus.in5
-rw-r--r--gcc/config/arm/arm.c3
3 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 123a9c3..e056a6d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,14 @@
2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
2020-01-16 Thomas Preud'homme <thomas.preudhomme@arm.com>
+ * config/arm/arm-cpus.in (ARMv8_1m_main): Redefine as an extension to
+ Armv8-M Mainline.
+ * config/arm/arm.c (arm_options_perform_arch_sanity_checks): Remove
+ error for using -mcmse when targeting Armv8.1-M Mainline.
+
+2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
+2020-01-16 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
* config/arm/arm.md (nonsecure_call_internal): Do not force memory
address in r4 when targeting Armv8.1-M Mainline.
(nonsecure_call_value_internal): Likewise.
diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
index fdf336a..f5cc5ca 100644
--- a/gcc/config/arm/arm-cpus.in
+++ b/gcc/config/arm/arm-cpus.in
@@ -272,10 +272,7 @@ define fgroup ARMv8_6a ARMv8_5a armv8_6
define fgroup ARMv8m_base ARMv6m armv8 cmse tdiv
define fgroup ARMv8m_main ARMv7m armv8 cmse
define fgroup ARMv8r ARMv8a
-# Feature cmse is omitted to disable Security Extensions support while secure
-# code compiled by GCC does not preserve FP context as allowed by Armv8.1-M
-# Mainline.
-define fgroup ARMv8_1m_main ARMv7m armv8 armv8_1m_main
+define fgroup ARMv8_1m_main ARMv8m_main armv8_1m_main
# Useful combinations.
define fgroup VFPv2 vfpv2
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 5e93f52..5bb7a45 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3777,9 +3777,6 @@ arm_options_perform_arch_sanity_checks (void)
if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE)
sorry ("__fp16 and no ldrh");
- if (use_cmse && arm_arch8_1m_main)
- error ("Armv8.1-M Mainline Security Extensions are unsupported");
-
if (use_cmse && !arm_arch_cmse)
error ("target CPU does not support ARMv8-M Security Extensions");