[6/7] v7: Update document

H.J. Lu hjl.tools@gmail.com
Sat Jun 28 18:26:00 GMT 2008


There is no change from the last one.


H.J.
---
2008-06-10  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 (MAX_STACK_ALIGNMENT): Add macro.
	(INCOMING_STACK_BOUNDARY): Likewise.
	(TARGET_UPDATE_STACK_BOUNDARY): New target hook.
	(TARGET_GET_DRAP_RTX): Likewise.

diff -x .svn -upr ../../gcc/gcc/doc gcc/gcc/doc
diff -x .svn -upr ../../gcc/gcc/doc/extend.texi gcc/gcc/doc/extend.texi
--- ../../gcc/gcc/doc/extend.texi	2008-06-10 09:48:12.000000000 -0700
+++ gcc/gcc/doc/extend.texi	2008-06-08 13:35:05.000000000 -0700
@@ -2746,17 +2746,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
diff -x .svn -upr ../../gcc/gcc/doc/invoke.texi gcc/gcc/doc/invoke.texi
--- ../../gcc/gcc/doc/invoke.texi	2008-06-10 09:48:12.000000000 -0700
+++ gcc/gcc/doc/invoke.texi	2008-06-10 10:16:19.000000000 -0700
@@ -554,7 +554,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
@@ -10717,18 +10719,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
@@ -10736,6 +10734,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
diff -x .svn -upr ../../gcc/gcc/doc/tm.texi gcc/gcc/doc/tm.texi
--- ../../gcc/gcc/doc/tm.texi	2008-06-03 14:48:14.000000000 -0700
+++ gcc/gcc/doc/tm.texi	2008-06-08 13:33:13.000000000 -0700
@@ -1085,6 +1085,12 @@ macro must evaluate to a value equal to 
 @code{STACK_BOUNDARY}.
 @end defmac
 
+@defmac INCOMING_STACK_BOUNDARY
+Define this macro if the incoming stack boundary may be different
+from @code{PREFERRED_STACK_BOUNDARY}.  This macro must evaluate
+to a value equal to or larger than @code{STACK_BOUNDARY}.
+@end defmac
+
 @defmac FUNCTION_BOUNDARY
 Alignment required for a function entry point, in bits.
 @end defmac
@@ -1118,6 +1124,18 @@ field alignment has not been set by the
 @code{__attribute__ ((aligned (@var{n})))} construct.
 @end defmac
 
+@defmac MAX_STACK_ALIGNMENT
+Biggest stack alignment guaranteed by the backend.  Use this macro
+to specify the maximum alignment of a variable on stack.
+
+If not defined, the default value is @code{STACK_BOUNDARY}.
+
+@c FIXME: The default should be @code{PREFERRED_STACK_BOUNDARY}.
+But the fix for PR 32893 indicates that we can only guarantee
+maximum stack alignment on stack up to @code{STACK_BOUNDARY}, not
+@code{PREFERRED_STACK_BOUNDARY}, if stack alignment isn't supported.
+@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
@@ -10501,6 +10519,16 @@ call stack unwinding.  It is used in dec
 and the associated definitions of those functions.
 @end defmac
 
+@deftypefn {Target Hook} void TARGET_UPDATE_STACK_BOUNDARY (void)
+Define this macro to update the current function stack boundary if
+necessary.
+@end deftypefn
+
+@deftypefn {Target Hook} rtx TARGET_GET_DRAP_RTX (void)
+Define this macro to an rtx for Dynamic Realign Argument Pointer if
+necessary.
+@end deftypefn
+
 @deftypefn {Target Hook} {bool} TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS (void)
 When optimization is disabled, this hook indicates whether or not
 arguments should be allocated to stack slots.  Normally, GCC allocates



More information about the Gcc-patches mailing list