[Sending on behalf of Andre Vieira]

Hello,

This patch adds the support of the '-mcmse' option to enable ARMv8-M's Security 
Extensions and supports the following intrinsics:
cmse_TT
cmse_TT_fptr
cmse_TTT
cmse_TTT_fptr
cmse_TTA
cmse_TTA_fptr
cmse_TTAT
cmse_TTAT_fptr
cmse_check_address_range
cmse_check_pointed_object
cmse_is_nsfptr
cmse_nsfptr_create

It also defines the mandatory cmse_address_info struct and the 
__ARM_FEATURE_CMSE macro.
See Chapter 4, Sections 5.2, 5.3 and 5.6 of ARMĀ®v8-M Security Extensions: 
Requirements on Development Tools 
(http://infocenter.arm.com/help/topic/com.arm.doc.ecm0359818/index.html).

*** gcc/ChangeLog ***
2015-10-27  Andre Vieira        <andre.simoesdiasvie...@arm.com>
            Thomas Preud'homme  <thomas.preudho...@arm.com>

        * gcc/config.gcc (extra_headers): Added arm_cmse.h.
        * gcc/config/arm/arm-arches.def (ARM_ARCH):
          (armv8-m): Add FL2_CMSE.
          (armv8-m.main): Likewise.
          (armv8-m.main+dsp): Likewise.
        * gcc/config/arm/arm-c.c
          (arm_cpu_builtins): Added __ARM_FEATURE_CMSE macro.
        * gcc/config/arm/arm-protos.h 
          (arm_is_constant_pool_ref): Define FL2_CMSE.
        * gcc/config/arm.c (arm_arch_cmse): New.
          (arm_option_override): New error for unsupported cmse target.
        * gcc/config/arm/arm.h (arm_arch_cmse): New.
        * gcc/config/arm/arm.opt (mcmse): New.
        * gcc/doc/invoke.texi (ARM Options): Add -mcmse.
        * gcc/config/arm/arm_cmse.h: New file.
        * libgcc/config/arm/cmse.c: Likewise.
        * libgcc/config/arm/t-arm (HAVE_CMSE): New.


*** gcc/testsuite/ChangeLog ***
2015-10-27  Andre Vieira        <andre.simoesdiasvie...@arm.com>
            Thomas Preud'homme  <thomas.preudho...@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.

We welcome any comments.

Cheers,

Andre

Reply via email to