diff mbox

[PATCHv2,ARM] -mpure-code option for ARM

Message ID 57E50670.50602@arm.com
State New
Headers show

Commit Message

Andre Vieira (lists) Sept. 23, 2016, 10:39 a.m. UTC
On 23/09/16 09:33, Andre Vieira (lists) wrote:
> On 23/09/16 02:21, Sandra Loosemore wrote:
>> On 09/22/2016 07:52 AM, Richard Earnshaw (lists) wrote:
>>> On 11/07/16 17:56, Andre Vieira (lists) wrote:
>>>> +
>>>> diff --git a/gcc/target.def b/gcc/target.def
>>>> index
>>>> a4df363698ce776b51d11c187baed2069ba88a52..a3d46fa48d919a16699c33b2b78236e62a33e025
>>>> 100644
>>>> --- a/gcc/target.def
>>>> +++ b/gcc/target.def
>>>> @@ -432,6 +432,19 @@ this section is associated.",
>>>>    void, (const char *name, unsigned int flags, tree decl),
>>>>    default_no_named_section)
>>>>
>>>> +/* Tell assembler what section attributes to assign this elf section
>>>> +   declaration, using their numerical value.  */
>>>> +DEFHOOK
>>>> +(elf_flags_numeric,
>>>> + "If the target needs to represent ELF section attributes using
>>>> their\n\
>>>> +numerical value, then this hook should be implemented to return true
>>>> and\n\
>>>> +write the numerical value of @var{flags} in @var{num}.  This
>>>> function is\n\
>>>> +called by @code{default_elf_asm_named_section}, which prints
>>>> @var{num}\n\
>>>> +as the value representing the ELF section attributes if this
>>>> function\n\
>>>> +returns true.",
>>>
>>>
>>> I think this should read something like.
>>>
>>> This hook can be used to encode ELF section flags for which no letter
>>> code has been defined in the assembler.  It is called by
>>> @code{default_asm_named_section} whenever the section flags need to be
>>> emitted in the assembler output.  If the hook returns true, then the
>>> numerical value for ELF section flags should be calculated from
>>> @var{flags} and saved in @var{*num}; the value will be printed out
>>> instead of the normal sequence of letter codes.  If the hook is not
>>> defined, or if it returns false, then @var{num} will be ignored and the
>>> traditional letter sequence will be emitted.
>>
>> Can we please write this in the present tense instead of the future,
>> assuming it describes current behavior (as modified by the patch)?
>>
>> s/will be/is/g
>>
>> -Sandra
>>
> Hi Sandra,
> 
> Is this better?
> 
> Cheers,
> Andre
> 
> gcc/ChangeLog
> 2016-09-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>
> 
>         * target.def(elf_flags_numeric): Change documentation to
>         present tense.
> 
And here is the patch with the tm.texi regeneration.

Cheers,
Andre

gcc/ChangeLog
2016-09-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>

        * target.def(elf_flags_numeric): Change documentation to
        present tense.
        * doc/tm.texi: Regenerate.

Comments

Sandra Loosemore Sept. 23, 2016, 3:04 p.m. UTC | #1
On 09/23/2016 04:39 AM, Andre Vieira (lists) wrote:
>> Hi Sandra,
>>
>> Is this better?
>>
>> Cheers,
>> Andre
>>
>> gcc/ChangeLog
>> 2016-09-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>
>>
>>          * target.def(elf_flags_numeric): Change documentation to
>>          present tense.
>>
> And here is the patch with the tm.texi regeneration.
>
> Cheers,
> Andre
>
> gcc/ChangeLog
> 2016-09-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>
>
>          * target.def(elf_flags_numeric): Change documentation to
>          present tense.
>          * doc/tm.texi: Regenerate.
>

This looks good to me.  Thanks.

-Sandra the grammar geek
Mickael Guene Oct. 4, 2016, 1:24 p.m. UTC | #2
Hi Andre,

  I can't see new testsuite files in trunk :
gcc.target/arm/pure-code/ffunction-sections.c
gcc.target/arm/pure-code/no-literal-pool.c
gcc.target/arm/pure-code/pure-code.exp

  It seems you forgot to include them in your patch.
Can you post a new one with those files ?

Regards
Mickael

On 09/23/2016 05:04 PM, Sandra Loosemore wrote:
> On 09/23/2016 04:39 AM, Andre Vieira (lists) wrote:
>>> Hi Sandra,
>>>
>>> Is this better?
>>>
>>> Cheers,
>>> Andre
>>>
>>> gcc/ChangeLog
>>> 2016-09-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>
>>>
>>>          * target.def(elf_flags_numeric): Change documentation to
>>>          present tense.
>>>
>> And here is the patch with the tm.texi regeneration.
>>
>> Cheers,
>> Andre
>>
>> gcc/ChangeLog
>> 2016-09-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>
>>
>>          * target.def(elf_flags_numeric): Change documentation to
>>          present tense.
>>          * doc/tm.texi: Regenerate.
>>
>
> This looks good to me.  Thanks.
>
> -Sandra the grammar geek
>
Andre Vieira (lists) Oct. 4, 2016, 2:15 p.m. UTC | #3
On 04/10/16 14:24, mickael guene wrote:
> Hi Andre,
> 
>  I can't see new testsuite files in trunk :
> gcc.target/arm/pure-code/ffunction-sections.c
> gcc.target/arm/pure-code/no-literal-pool.c
> gcc.target/arm/pure-code/pure-code.exp
> 
>  It seems you forgot to include them in your patch.
> Can you post a new one with those files ?
> 
> Regards
> Mickael
> 

Yeah ... forgot to svn add, committed in revision r240746. Thanks for
that catch!

Cheers,
Andre
diff mbox

Patch

diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 68a77e81aa1e2abcc15bc9088011295df699c4d0..8a98ba43a67eac87c2be8a974f6c0b924e519f52 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7574,10 +7574,10 @@  code has been defined in the assembler.  It is called by
 @code{default_asm_named_section} whenever the section flags need to be
 emitted in the assembler output.  If the hook returns true, then the
 numerical value for ELF section flags should be calculated from
-@var{flags} and saved in @var{*num}; the value will be printed out
-instead of the normal sequence of letter codes.  If the hook is not
-defined, or if it returns false, then @var{num} will be ignored and the
-traditional letter sequence will be emitted.
+@var{flags} and saved in @var{*num}; the value is printed out instead of the
+normal sequence of letter codes.  If the hook is not defined, or if it
+returns false, then @var{num} is ignored and the traditional letter sequence
+is emitted.
 @end deftypefn
 
 @deftypefn {Target Hook} {section *} TARGET_ASM_FUNCTION_SECTION (tree @var{decl}, enum node_frequency @var{freq}, bool @var{startup}, bool @var{exit})
diff --git a/gcc/target.def b/gcc/target.def
index ac693318adaaa230ea300f10bc37282881d9da6f..4adb8aabc6548889b717abc9310e98f0e6fc161b 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -441,10 +441,10 @@  code has been defined in the assembler.  It is called by\n\
 @code{default_asm_named_section} whenever the section flags need to be\n\
 emitted in the assembler output.  If the hook returns true, then the\n\
 numerical value for ELF section flags should be calculated from\n\
-@var{flags} and saved in @var{*num}; the value will be printed out\n\
-instead of the normal sequence of letter codes.  If the hook is not\n\
-defined, or if it returns false, then @var{num} will be ignored and the\n\
-traditional letter sequence will be emitted.",
+@var{flags} and saved in @var{*num}; the value is printed out instead of the\n\
+normal sequence of letter codes.  If the hook is not defined, or if it\n\
+returns false, then @var{num} is ignored and the traditional letter sequence\n\
+is emitted.",
  bool, (unsigned int flags, unsigned int *num),
  hook_uint_uintp_false)