From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35006 invoked by alias); 6 May 2015 23:04:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 34990 invoked by uid 89); 6 May 2015 23:04:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 May 2015 23:04:22 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1Yq8MU-00078x-AW from Sandra_Loosemore@mentor.com ; Wed, 06 May 2015 16:04:18 -0700 Received: from [IPv6:::1] (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Wed, 6 May 2015 16:04:17 -0700 Message-ID: <554A9DB1.1070009@codesourcery.com> Date: Wed, 06 May 2015 23:04:00 -0000 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Christian Bruel CC: "gcc-patches@gcc.gnu.org" , Ramana Radhakrishnan , Richard Earnshaw , Nicholas Clifton Subject: Re: [PATCH, ARM] attribute target (thumb,arm) [4/6] respin (4th) References: <554A243B.8010902@st.com> In-Reply-To: <554A243B.8010902@st.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00510.txt.bz2 On 05/06/2015 08:24 AM, Christian Bruel wrote: > diff '--exclude=.svn' -ruN gnu_trunk.p3/gcc/gcc/doc/extend.texi gnu_trunk.p4/gcc/gcc/doc/extend.texi > --- gnu_trunk.p3/gcc/gcc/doc/extend.texi 2015-05-06 09:00:31.232943164 +0200 > +++ gnu_trunk.p4/gcc/gcc/doc/extend.texi 2015-05-06 14:50:05.632612233 +0200 > @@ -3419,6 +3419,25 @@ > the compiler rejects attempts to specify an alternative. > @end table > > +@item target (@var{options}) > +@cindex @code{target} function attribute > +As discussed in @ref{Common Function Attributes}, this attribute > +allows specification of target-specific compilation options. > + > +On ARM, the following options are allowed: > + > +@table @samp > +@item thumb > +@cindex @code{target("thumb")} function attribute, ARM > +Force Thumb1 Thumb2 code generation depending on the architecture. "Force Thumb or Thumb-2 code generation, depending on the architecture." (I believe that's ARM's official terminology, rather than "Thumb1" or "Thumb2".) > + > +@item arm > +@cindex @code{target("arm")} function attribute, ARM > +Force ARM code generation. > +@end table > + > +Functions from different modes can be inlined using the caller mode. "...the caller's mode." > + > @node AVR Function Attributes > @subsection AVR Function Attributes > > @@ -18436,8 +18455,9 @@ > @xref{Function Attributes}, for more information about the > @code{target} attribute and the attribute syntax. > > -The @code{#pragma GCC target} pragma is presently implemented for > -x86, PowerPC, and Nios II targets only. > +The @code{#pragma GCC target} pragma is implemented for > +ARM, x86, PowerPC, and Nios II targets. > + > @end table > > @table @code Please also add a cross-reference to ARM Function Attributes in the main entry for @item target in Common Function Attributes, in this paragraph: The options supported are specific to each target; refer to @ref{x86 Function Attributes}, @ref{PowerPC Function Attributes}, and @ref{Nios II Function Attributes}, for details. > diff '--exclude=.svn' -ruN gnu_trunk.p3/gcc/gcc/doc/invoke.texi gnu_trunk.p4/gcc/gcc/doc/invoke.texi > --- gnu_trunk.p3/gcc/gcc/doc/invoke.texi 2015-05-06 09:00:31.232943164 +0200 > +++ gnu_trunk.p4/gcc/gcc/doc/invoke.texi 2015-05-06 14:36:32.331213593 +0200 > @@ -13434,6 +13434,10 @@ > configuring GCC with the @option{--with-mode=}@var{state} > configure option. > > +You can also override the ARM and Thumb mode for each function > +by using the @code{target("thumb")} and @code{target("arm")} function attributes > +(@pxref{Function Attributes}) or pragmas (@pxref{Function Specific Option Pragmas}). You can make the first reference point at the ARM Function Attributes node, now that it exists, instead of the generic Function Attributes section. > + > @item -mtpcs-frame > @opindex mtpcs-frame > Generate a stack frame that is compliant with the Thumb Procedure Call -Sandra