This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Implement TARGET_HANDLE_GENERIC_ATTRIBUTE


On 9/3/19 3:00 PM, Jozef Lawrynowicz wrote:
> On Tue, 3 Sep 2019 13:37:57 -0600
> Jeff Law <law@redhat.com> wrote:
> 
>> On 8/30/19 4:09 AM, Jozef Lawrynowicz wrote:
>>> The attached patch adds a new target hook "TARGET_HANDLE_GENERIC_ATTRIBUTE"
>>> which enables a back end to perform additional processing of an attribute that
>>> is normally handled by a front end.
>>>
>>> So far only the "section" and "noinit" attribute make use of this hook, as the
>>> msp430 back end requires additional attribute conflict checking to be performed
>>> on these generic attributes.
>>>
>>>
>>> 0001-Implement-TARGET_HANDLE_GENERIC_ATTRIBUTE.patch
>>>
>>> From e693da709114df378e2ea8b1d3729b105c99a495 Mon Sep 17 00:00:00 2001
>>> From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
>>> Date: Wed, 28 Aug 2019 14:09:20 +0100
>>> Subject: [PATCH 1/3] Implement TARGET_HANDLE_GENERIC_ATTRIBUTE
>>>
>>> gcc/ChangeLog:
>>>
>>> 2019-08-29  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
>>>
>>> 	* config/msp430/msp430.c (TARGET_HANDLE_GENERIC_ATTRIBUTE): Define.
>>> 	(msp430_handle_generic_attribute): New function.
>>> 	* doc/tm.texi: Regenerate.
>>> 	* doc/tm.texi.in: Add TARGET_HANDLE_GENERIC_ATTRIBUTE.
>>> 	* hooks.c (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
>>> 	* hooks.h (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
>>> 	* target.def: Define new hook TARGET_HANDLE_GENERIC_ATTRIBUTE.
>>>
>>> gcc/c-family/ChangeLog:
>>>
>>> 2019-08-29  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
>>>
>>> 	* c-attribs.c (handle_section_attribute): Call the
>>> 	handle_generic_attribute target hook after performing target
>>> 	independent processing.
>>> 	(handle_noinit_attribute): Likewise.  
>> Just a nit.  In a couple places in c-attribs.c you have:
>>
>>> +  if (!(* no_add_attrs))  
>>
>> Drop the whitespace between the * and no_add_attrs.
>>
>> OK with that change.
> 
> Thanks, I fixed that and other instances of "* <varname>" in the patches
> before applying. Seems to be a common style slip-up in the msp430 backend.
Yea, saw it's relatively common in the msp430 target files, given how
often it shows up in there I didn't call it out in the msp target files
in your patch, just in the generic bits.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]