Add support for ARMv8-M's Secure Extensions flag and intrinsics
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Fri, 2 Dec 2016 15:22:43 +0000 (15:22 +0000)
committerAndre Vieira <avieira@gcc.gnu.org>
Fri, 2 Dec 2016 15:22:43 +0000 (15:22 +0000)
commitde7b57234525f55e5edfe8db77ca7ac2a943468f
tree6811602f7f8aa090716356b734baf53b5076392b
parentf1bca06f624245fde8a485deb2a589ba5d752537
Add support for ARMv8-M's Secure Extensions flag and intrinsics

    gcc/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
        Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config.gcc (extra_headers): Added arm_cmse.h.
* config/arm/arm-arches.def (ARM_ARCH):
(armv8-m): Add FL2_CMSE.
(armv8-m.main): Likewise.
(armv8-m.main+dsp): Likewise.
* config/arm/arm-c.c
(arm_cpu_builtins): Added __ARM_FEATURE_CMSE macro.
* config/arm/arm-flags.h: Define FL2_CMSE.
* config/arm.c (arm_arch_cmse): New.
(arm_option_override): New error for unsupported cmse target.
* config/arm/arm.h (arm_arch_cmse): New.
* config/arm/arm.opt (mcmse): New.
* config/arm/arm_cmse.h: New file.
* doc/invoke.texi (ARM Options): Add -mcmse.
* doc/sourcebuild.texi (arm_cmse_ok): Add new effective target.
* doc/extend.texi: Add ARMv8-M Security Extensions entry.

    gcc/testsuite/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
        Thomas Preud'homme  <thomas.preudhomme@arm.com>

* gcc.target/arm/cmse/cmse.exp: New.
* gcc.target/arm/cmse/cmse-1.c: New.
* gcc.target/arm/cmse/cmse-12.c: New.
* lib/target-supports.exp
(check_effective_target_arm_cmse_ok): New.

    libgcc/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
    Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/t-arm (HAVE_CMSE): New.
* config/arm/cmse.c: New.

Co-Authored-By: Thomas Preud'homme <thomas.preudhomme@arm.com>
From-SVN: r243187
20 files changed:
gcc/ChangeLog
gcc/config.gcc
gcc/config/arm/arm-arches.def
gcc/config/arm/arm-c.c
gcc/config/arm/arm-flags.h
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/arm/arm.opt
gcc/config/arm/arm_cmse.h [new file with mode: 0644]
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/cmse/cmse-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/cmse-12.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/cmse.exp [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp
libgcc/ChangeLog
libgcc/config/arm/cmse.c [new file with mode: 0644]
libgcc/config/arm/t-arm