On 27/10/16 11:19, Kyrill Tkachov wrote: > > On 27/10/16 10:54, Andre Vieira (lists) wrote: >> On 26/10/16 17:28, Kyrill Tkachov wrote: >>> On 26/10/16 17:28, Andre Vieira (lists) wrote: >>>> On 26/10/16 10:33, Kyrill Tkachov wrote: >>>>> +static tree >>>>> +arm_handle_cmse_nonsecure_entry (tree *node, tree name, >>>>> + tree /* args */, >>>>> + int /* flags */, >>>>> + bool *no_add_attrs) >>>>> +{ >>>>> + tree fndecl; >>>>> + >>>>> + if (!use_cmse) >>>>> + { >>>>> + *no_add_attrs = true; >>>>> + return NULL_TREE; >>>>> + } >>>>> >>>>> Do you also want to warn the user here that the attribute will be >>>>> ignored? >>>>> This looks ok to me otherwise. >>>>> >>>> Can easily do and might be more user friendly. How about >>>> " attribute ignored without -mcmse option." >>> Yes, that's fine (without the full stop at the end) >>> Kyrill >>> >>>> Cheers, >>>> Andre >>>> >> Hi, >> >> Reworked comments. No change to ChangeLogs. > > Ok. > Thanks, > Kyrill > >> Cheers, >> Andre > Hi, Backported this to the embedded-6-branch in revision r243248. Cheers, Andre gcc/ChangeLog.arm: 2016-12-05 Andre Vieira Backport from mainline 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm.c (arm_handle_cmse_nonsecure_entry): New. (arm_attribute_table): Added cmse_nonsecure_entry (arm_compute_func_type): Handle cmse_nonsecure_entry. (cmse_func_args_or_return_in_stack): New. (arm_handle_cmse_nonsecure_entry): New. * config/arm/arm.h (ARM_FT_CMSE_ENTRY): New macro define. (IS_CMSE_ENTRY): Likewise. * doc/extend.texi (ARM ARMv8-M Security Extensions): New attribute. gcc/testsuite/ChangeLog.arm: 2016-12-05 Andre Vieira Backport from mainline 2016-12-02 Andre Vieira Thomas Preud'homme