[PATCHv3 5/7, GCC, ARM, V8M] Handling ARMv8-M Security Extension's cmse_nonsecure_call attribute

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Wed Nov 30 17:22:00 GMT 2016


On 30/11/16 12:05, Andre Vieira (lists) wrote:
> Hi,
>
> I got a bug report against the old version of this patch and fixed it
> here. This had to do with GCC optimizations sharing types with and
> without the 'cmse_nonsecure_call' attribute.  The patch now no longer
> sets the main variant, this didn't seem to do what I thought it did.
> Instead the patch now creates distinct type copies for every declared
> pointer that eventually points to the function type with the attribute,
> it will also create a distinct copy for the function type itself.
> Another change in this patch was to make 'arm_comp_type_attributes', the
> ARM implementation of TARGET_COMP_TYPE_ATTRIBUTES, deny compatibility
> between function types with the attribute and without.
>
> I added a test case to test the issue solved with these changes.

Ok.
Thanks,
Kyrill

> *** gcc/ChangeLog ***
> 2016-11-xx  Andre Vieira        <andre.simoesdiasvieira@arm.com>
>              Thomas Preud'homme  <thomas.preudhomme@arm.com>
>
>          * config/arm/arm.c (gimplify.h): New include.
>          (arm_handle_cmse_nonsecure_call): New.
>          (arm_attribute_table): Added cmse_nonsecure_call.
>          (arm_comp_type_attributes): Deny compatibility of function types
> with
>          without the cmse_nonsecure_call attribute.
>          * doc/extend.texi (ARM ARMv8-M Security Extensions): New attribute.
>
> *** gcc/testsuite/ChangeLog ***
> 2016-11-xx  Andre Vieira        <andre.simoesdiasvieira@arm.com>
>              Thomas Preud'homme  <thomas.preudhomme@arm.com>
>
>          * gcc.target/arm/cmse/cmse-3.c: Add tests.
>          * gcc.target/arm/cmse/cmse-4.c: Add tests.
>          * gcc.target/arm/cmse/cmse-15.c: New.
>
>
> Cheers,
> Andre



More information about the Gcc-patches mailing list