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][doc][13/14] Document AArch64 target attributes and pragmas


On 07/16/2015 09:21 AM, Kyrill Tkachov wrote:
Hi all,

This patch adds the documentation for the AArch64 target attributes and
pragmas.

Ok for trunk?

The content looks OK, but I have a bunch of nit-picky comments about grammar, typos, markup, etc....

+The following target-specific function attributes are available for
+the AArch64 target and for the most part mirror the behavior of similar
+command line options, but on a per-function basis:

s/command line option/command-line option/g

It would be good to add a cross-reference to the section where the command-line options are documented. I recommend splitting the introductory sentence into two, like:

The following target-specific function attributes are available for the AArch64 target. For the most part, these options mirror the behavior of similar command-line options (@pxref{AArch64 Options}), but on a per-function basis.

+
+@table @code
+@item general-regs-only
+@cindex @code{general-regs-only} function attribute, AArch64
+Indicates that no floating point or AdvancedSIMD registers should be

s/floating point/floating-point/
s/AdvancedSIMD/Advanced SIMD/

+used when generating code for this function.  If the function explicitly
+uses floating point code, then the compiler will give an error.  This is

s/floating point code/floating-point code/
s/will give/gives/

+the same behavior as that of the command line option
+@code{-mgeneral-regs-only}.

Please use @option markup instead of @code on option names throughout this patch.

+@item cmodel=
+@cindex @code{cmodel=} function attribute, AArch64
+Indicates that code should be generated for a particular code model for
+this function.  The behaviour and permissible arguments are the same as

s/behaviour/behavior/

(We prefer to consistently use American spellings throughout the GCC documentation.)

+@item strict-align
+@cindex @code{strit-align} function attribute, AArch64

s/strit-align/strict-align/

+The above target attributes can be specified as follows:
+
+@smallexample
+__attribute__((target("<attr-string>")))
+int
+f (int a)
+@{
+  return a + 5;
+@}
+@end smallexample
+
+where @code{<attr-string>} is one of the attribute strings specified above.

s/<attr-string>/@var{attr-string}/g

+In this example @code{target("+crc+nocrypto")} will enable the @code{crc}
+extension and disable the @code{crypto} extension for the function @code{foo}

s/will enable/enables/
s/disable/disables/

+is valid and will compile function @code{foo} for ARMv8-A with @code{crc}
+and @code{crypto} extensions and tune it for @code{cortex-a53}.

s/will compile/compiles/
s/tune/tunes/

+@code{-mcpu=} optio or the @code{cpu=} attribute conflicts with the
s/optio/option/

@@ -18159,6 +18299,19 @@ for further explanation.
 * Loop-Specific Pragmas::
 @end menu

+@node AArch64 Pragmas
+@subsection AArch64 Pragmas
+
+The pragmas defined by the AArch64 target correspond to the AArch64
+target function attributes.  They can be specified as below:
+@smallexample
+#pragma GCC target("<string>")
+@end smallexample
+
+where @code{<string>} can be any string accepted as an AArch64 target
+attribute.  @xref{AArch64 Function Attributes} for more details
+on the permissible values of @code{<string>}.

s/<string>/@var{string}/g

-Sandra



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