Commit 4747e2cc by Mihail Ionescu

[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.
parent a464ffc2
2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com> 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
2020-01-16 Thomas Preud'homme <thomas.preudhomme@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 * config/arm/arm.md (nonsecure_call_internal): Do not force memory
address in r4 when targeting Armv8.1-M Mainline. address in r4 when targeting Armv8.1-M Mainline.
(nonsecure_call_value_internal): Likewise. (nonsecure_call_value_internal): Likewise.
......
...@@ -272,10 +272,7 @@ define fgroup ARMv8_6a ARMv8_5a armv8_6 ...@@ -272,10 +272,7 @@ define fgroup ARMv8_6a ARMv8_5a armv8_6
define fgroup ARMv8m_base ARMv6m armv8 cmse tdiv define fgroup ARMv8m_base ARMv6m armv8 cmse tdiv
define fgroup ARMv8m_main ARMv7m armv8 cmse define fgroup ARMv8m_main ARMv7m armv8 cmse
define fgroup ARMv8r ARMv8a define fgroup ARMv8r ARMv8a
# Feature cmse is omitted to disable Security Extensions support while secure define fgroup ARMv8_1m_main ARMv8m_main armv8_1m_main
# 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
# Useful combinations. # Useful combinations.
define fgroup VFPv2 vfpv2 define fgroup VFPv2 vfpv2
......
...@@ -3777,9 +3777,6 @@ arm_options_perform_arch_sanity_checks (void) ...@@ -3777,9 +3777,6 @@ arm_options_perform_arch_sanity_checks (void)
if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE) if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE)
sorry ("__fp16 and no ldrh"); 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) if (use_cmse && !arm_arch_cmse)
error ("target CPU does not support ARMv8-M Security Extensions"); error ("target CPU does not support ARMv8-M Security Extensions");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment