[PATCH 6/7]: Ping3: Merge from Stack Branch - Document changes
Richard Guenther
richard.guenther@gmail.com
Wed May 28 10:37:00 GMT 2008
On Wed, May 28, 2008 at 10:59 AM, Ye, Joey <joey.ye@intel.com> wrote:
> No change since last update. OK to mainline?
This is ok if the rest of the patches get approved.
Thanks,
Richard.
> Thanks - Joey
>
> 2008-05-28 H.J. Lu <hongjiu.lu@intel.com>
>
> * doc/extend.texi: Update force_align_arg_pointer.
> * doc/invoke.texi: Document -mincoming-stack-boundary. Update
> -mstackrealign.
> * doc/tm.texi (LOCAL_ALIGNMENT): Add mode.
>
> Index: doc/extend.texi
> ===================================================================
> --- doc/extend.texi (revision 136046)
> +++ doc/extend.texi (working copy)
> @@ -2733,17 +2733,13 @@ floating point arguments on the stack.
>
> @item force_align_arg_pointer
> @cindex @code{force_align_arg_pointer} attribute
> -On the Intel x86, the @code{force_align_arg_pointer} attribute may be
> -applied to individual function definitions, generating an alternate
> -prologue and epilogue that realigns the runtime stack. This supports
> -mixing legacy codes that run with a 4-byte aligned stack with modern
> -codes that keep a 16-byte stack for SSE compatibility. The alternate
> -prologue and epilogue are slower and bigger than the regular ones, and
> -the alternate prologue requires a scratch register; this lowers the
> -number of registers available if used in conjunction with the
> -@code{regparm} attribute. The @code{force_align_arg_pointer}
> -attribute is incompatible with nested functions; this is considered a
> -hard error.
> +The @code{force_align_arg_pointer} attribute may be applied to
> +individual function definitions, assuming that the runtime stack is
> +aligned according to the psABI and generating an alternate
> +prologue/epilogue that realigns the runtime stack if necessary.
> +On the Intel x86, this supports mixing codes that keep a 4-byte aligned
> +stack, as specified by i386 psABI, with codes that need a 16-byte
> +aligned stack, as required by SSE instructions.
>
> @item resbank
> @cindex @code{resbank} attribute
> Index: doc/tm.texi
> ===================================================================
> --- doc/tm.texi (revision 136046)
> +++ doc/tm.texi (working copy)
> @@ -1118,6 +1118,13 @@ field alignment has not been set by the
> @code{__attribute__ ((aligned (@var{n})))} construct.
> @end defmac
>
> +@defmac MAX_STACK_ALIGNMENT
> +Biggest stack alignment supported by the backend. Use this macro
> +to specify the maximum alignment of a variable on stack if it is
> +greater than @code{PREFERRED_STACK_BOUNDARY}. If not defined, the
> +default value is zero.
> +@end defmac
> +
> @defmac MAX_OFILE_ALIGNMENT
> Biggest alignment supported by the object file format of this machine.
> Use this macro to limit the alignment which can be specified using the
> @@ -1160,11 +1167,16 @@ constants to be word aligned so that @co
> constants can be done inline.
> @end defmac
>
> -@defmac LOCAL_ALIGNMENT (@var{type}, @var{basic-align})
> +@defmac LOCAL_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align})
> If defined, a C expression to compute the alignment for a variable in
> -the local store. @var{type} is the data type, and @var{basic-align} is
> -the alignment that the object would ordinarily have. The value of this
> -macro is used instead of that alignment to align the object.
> +the local store. @var{type} is the data type, @var{mode} is the mode,
> +and @var{basic-align} is the alignment that the object would ordinarily
> +have. The value of this macro is used instead of that alignment to
> +align the object.
> +
> +If @var{type} is @code{NULL}, we are allocating a stack slot for
> +caller-save register in @var{mode}. If @var{mode} is @code{VOIDmode},
> +it is ignored.
>
> If this macro is not defined, then @var{basic-align} is used.
>
> Index: doc/invoke.texi
> ===================================================================
> --- doc/invoke.texi (revision 136046)
> +++ doc/invoke.texi (working copy)
> @@ -553,7 +553,9 @@ Objective-C and Objective-C++ Dialects}.
> -masm=@var{dialect} -mno-fancy-math-387 @gol
> -mno-fp-ret-in-387 -msoft-float @gol
> -mno-wide-multiply -mrtd -malign-double @gol
> --mpreferred-stack-boundary=@var{num} -mcld -mcx16 -msahf -mrecip @gol
> +-mpreferred-stack-boundary=@var{num}
> +-mincoming-stack-boundary=@var{num}
> +-mcld -mcx16 -msahf -mrecip @gol
> -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 @gol
> -maes -mpclmul @gol
> -msse4a -m3dnow -mpopcnt -mabm -msse5 @gol
> @@ -10728,18 +10730,14 @@ when this option is used to set the prec
>
> @item -mstackrealign
> @opindex mstackrealign
> -Realign the stack at entry. On the Intel x86, the
> -@option{-mstackrealign} option will generate an alternate prologue and
> -epilogue that realigns the runtime stack. This supports mixing legacy
> -codes that keep a 4-byte aligned stack with modern codes that keep a
> -16-byte stack for SSE compatibility. The alternate prologue and
> -epilogue are slower and bigger than the regular ones, and the
> -alternate prologue requires an extra scratch register; this lowers the
> -number of registers available if used in conjunction with the
> -@code{regparm} attribute. The @option{-mstackrealign} option is
> -incompatible with the nested function prologue; this is considered a
> -hard error. See also the attribute @code{force_align_arg_pointer},
> -applicable to individual functions.
> +Realign the stack at entry. The @option{-mstackrealign} option will
> +assume that the runtime stack is aligned according to the psABI and
> +generate an alternate prologue/epilogue that realigns the runtime stack
> +if necessary. On the Intel x86, this supports mixing codes that keep a
> +4-byte aligned stack, as specified by i386 psABI, with codes that need
> +a 16-byte aligned stack, as required by SSE instructions. See also the
> +attribute @code{force_align_arg_pointer}, applicable to individual
> +functions.
>
> @item -mpreferred-stack-boundary=@var{num}
> @opindex mpreferred-stack-boundary
> @@ -10747,6 +10745,12 @@ Attempt to keep the stack boundary align
> byte boundary. If @option{-mpreferred-stack-boundary} is not
> specified,
> the default is 4 (16 bytes or 128 bits).
>
> +@item -mincoming-stack-boundary=@var{num}
> +@opindex mincoming-stack-boundary
> +Assume the incoming stack is aligned to a 2 raised to @var{num} byte
> +boundary. If @option{-mincoming-stack-boundary} is not specified,
> +the one specified by @option{-mpreferred-stack-boundary} will be used.
> +
> On Pentium and PentiumPro, @code{double} and @code{long double} values
> should be aligned to an 8 byte boundary (see @option{-malign-double})
> or
> suffer significant run time performance penalties. On Pentium III, the
>
More information about the Gcc-patches
mailing list