diff options
author | stuart <stuart@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-18 00:34:44 +0000 |
---|---|---|
committer | stuart <stuart@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-18 00:34:44 +0000 |
commit | 124c02016c90c9794e7e786c22afaf224e867e26 (patch) | |
tree | 76255841987be3306d958753a8feba9aea4e6b6e /gcc/doc/invoke.texi | |
parent | 3e9c0efdb1c6e313edd244640d45a21bce0d4678 (diff) | |
download | gcc-124c02016c90c9794e7e786c22afaf224e867e26.tar.gz |
* gcc/config/i386/i386.opt (-mstackrealign): New flag. *
gcc/config/i386/i386.c (force_align_arg_pointer): New attribute.
(ix86_handle_cconv_attribute): Emit error when
force_align_arg_pointer attribute collides with too many regparms.
(ix86_function_regparm): Limit regparms when used with
force_align_arg_pointer attribute. (ix86_internal_arg_pointer):
Support stack-realigning prologue in non-main functions. Emit
warning for nested functions under -mstackrealign, emit error for
nested functions with force_align_arg_pointer attribute.
* gcc/doc/extend.texi (force_align_arg_pointer): Document it.
* gcc/doc/invoke.texi (-mstackrealign): Document it.
* testsuite/gcc.target/i386/20060512-1.c: New.
* testsuite/gcc.target/i386/20060512-2.c: New.
* testsuite/gcc.target/i386/20060512-3.c: New.
* testsuite/gcc.target/i386/20060512-4.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r-- | gcc/doc/invoke.texi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index df6074c3a09..9ac49e999eb 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -537,6 +537,7 @@ Objective-C and Objective-C++ Dialects}. -mthreads -mno-align-stringops -minline-all-stringops @gol -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol -m96bit-long-double -mregparm=@var{num} -msseregparm @gol +-mstackrealign @gol -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol -mcmodel=@var{code-model} @gol -m32 -m64 -mlarge-data-threshold=@var{num}} @@ -9464,6 +9465,21 @@ function by using the function attribute @samp{sseregparm}. modules with the same value, including any libraries. This includes the system libraries and startup modules. +@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. + @item -mpreferred-stack-boundary=@var{num} @opindex mpreferred-stack-boundary Attempt to keep the stack boundary aligned to a 2 raised to @var{num} |