[PATCH, GCC/ARM, 10/10] Enable -mcmse
authorMihail Ionescu <mihail.ionescu@arm.com>
Wed, 15 Jan 2020 11:49:32 +0000 (11:49 +0000)
committerMihail Ionescu <mihail.ionescu@arm.com>
Thu, 16 Jan 2020 15:12:14 +0000 (15:12 +0000)
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.

gcc/ChangeLog
gcc/config/arm/arm-cpus.in
gcc/config/arm/arm.c

index 123a9c39c9a59199d085c56d89b912643e9ba919..e056a6d6210d05e2eed9de1ef6dfa54ecb4958fb 100644 (file)
@@ -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.
index fdf336a59302460d3a6ec7b5273b926f7affbae6..f5cc5ca2c317bd5e78f482fcffe629b072482643 100644 (file)
@@ -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
index 5e93f52f856d31fece589577dff8dac644200662..5bb7a458b56e0ba9db102e410422927285515a40 100644 (file)
@@ -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");