From patchwork Fri Sep 23 10:39:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andre Vieira (lists)" X-Patchwork-Id: 674028 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sgVHZ3NrLz9syB for ; Fri, 23 Sep 2016 20:40:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=MJbhxIUD; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=hngOL66q2orKRYnGs awptKLHygivWp8cpbIGAc4UjmAQ7cq1zfzZ03Dvc7cX+kNyhN5EYnL79nZVw4c5I BrjFR03GsHpvrLntvRja+2SskL+3wox5tqLI8GuTgfhVyPnVaYfk2H5W6U+/TCIv jhBqtY08gVh+P8B18S88GVV89U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=7ODF6te56GU//iIWIS5k9X5 OF0w=; b=MJbhxIUDW+EZ9nIrcaI68gmKWbyiJCduCN0q7Tr7YsORhnfu/eEViVK 85F53gTmj3TmDgRMTUPegecQOLRmMTG8i7qFkweEQbRsIp/NKlPIBHJ6RBEBjvU/ uQPfA4xC+cHBKFYVIqJl8WLiKWIfw3F3vL//E20dDo8k/3uPiTEY= Received: (qmail 45950 invoked by alias); 23 Sep 2016 10:39:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 45939 invoked by uid 89); 23 Sep 2016 10:39:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00, KAM_LOTSOFHASH, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:4744, letter X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Sep 2016 10:39:47 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8C82F14F; Fri, 23 Sep 2016 03:39:46 -0700 (PDT) Received: from [10.2.206.234] (e107157-lin.cambridge.arm.com [10.2.206.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 176C73F32C; Fri, 23 Sep 2016 03:39:45 -0700 (PDT) Subject: Re: [PATCHv2][ARM] -mpure-code option for ARM To: gcc-patches@gcc.gnu.org, Sandra Loosemore References: <57752D6E.9070006@arm.com> <47c8a674-3af0-afff-776b-9d71c0d1bb46@st.com> <5783CFD1.2070500@arm.com> <57E483AD.3020107@codesourcery.com> <57E4E8D1.7000309@arm.com> From: "Andre Vieira (lists)" Message-ID: <57E50670.50602@arm.com> Date: Fri, 23 Sep 2016 11:39:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <57E4E8D1.7000309@arm.com> X-IsSubscribed: yes 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 > > * 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 * target.def(elf_flags_numeric): Change documentation to present tense. * doc/tm.texi: Regenerate. 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)