Commit de117207 by Martin Sebor Committed by Martin Sebor

extend.texi (attribute aligned): Expand.

gcc/ChangeLog:
	* doc/extend.texi (attribute aligned): Expand.

From-SVN: r266792
parent d012ab60
2018-12-04 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (attribute aligned): Expand.
2018-12-04 David Edelsohn <dje.gcc@gmail.com> 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
PR target/61976 PR target/61976
...@@ -2442,16 +2442,20 @@ and may not be available on all targets. ...@@ -2442,16 +2442,20 @@ and may not be available on all targets.
@itemx aligned (@var{alignment}) @itemx aligned (@var{alignment})
@cindex @code{aligned} function attribute @cindex @code{aligned} function attribute
The @code{aligned} attribute specifies a minimum alignment for The @code{aligned} attribute specifies a minimum alignment for
the function, measured in bytes. When specified, @var{alignment} must the first instruction of the function, measured in bytes. When specified,
be an integer constant power of 2. Specifying no @var{alignment} argument @var{alignment} must be an integer constant power of 2. Specifying no
implies the maximum alignment for the target, which is often, but by no @var{alignment} argument implies the ideal alignment for the target.
means always, 8 or 16 bytes. The @code{__alignof__} operator can be used to determine what that is
(@pxref{Alignment}). The attribute has no effect when a definition for
You cannot use this attribute to decrease the alignment of a function, the function is not provided in the same translation unit.
only to increase it. However, when you explicitly specify a function
alignment this overrides the effect of the The attribute cannot be used to decrease the alignment of a function
@option{-falign-functions} (@pxref{Optimize Options}) option for this previously declared with a more restrictive alignment; only to increase
function. it. Attempts to do otherwise are diagnosed. Some targets specify
a minimum default alignment for functions that is greater than 1. On
such targets, specifying a less restrictive alignment is silently ignored.
Using the attribute overrides the effect of the @option{-falign-functions}
(@pxref{Optimize Options}) option for this function.
Note that the effectiveness of @code{aligned} attributes may be Note that the effectiveness of @code{aligned} attributes may be
limited by inherent limitations in the system linker limited by inherent limitations in the system linker
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment