diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-23 11:50:50 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-23 11:50:50 +0000 |
commit | 1a8744913336f0a05dd60741d211ccfe5d322dc7 (patch) | |
tree | 27041cf7f79a06096f0227a88d2cf26f16e1c4c3 /gcc/doc/invoke.texi | |
parent | b023ca709222793a5707079eb7f1823008ac3036 (diff) | |
download | gcc-1a8744913336f0a05dd60741d211ccfe5d322dc7.tar.gz |
* config/i386/i386.c (override_options): Default to minimum
stack alignment when optimizing for code size.
* doc/invoke.texi (-mpreferred-stack-boundary): Document the
change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46433 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r-- | gcc/doc/invoke.texi | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index dc1c58feb48..1054c2bf358 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7587,12 +7587,13 @@ startup modules. @opindex mpreferred-stack-boundary Attempt to keep the stack boundary aligned to a 2 raised to @var{num} byte boundary. If @option{-mpreferred-stack-boundary} is not specified, -the default is 4 (16 bytes or 128 bits). +the default is 4 (16 bytes or 128 bits), except when optimizing for code +size (@option{-Os}), in which case the default is the minimum correct +alignment (4 bytes for x86, and 8 bytes for x86-64). -The stack is required to be aligned on a 4 byte boundary. 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 +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 Streaming SIMD Extension (SSE) data type @code{__m128} suffers similar penalties if it is not 16 byte aligned. @@ -7604,10 +7605,10 @@ stack boundary from a function compiled with a lower preferred stack boundary will most likely misalign the stack. It is recommended that libraries that use callbacks always use the default setting. -This extra alignment does consume extra stack space. Code that is sensitive -to stack space usage, such as embedded systems and operating system kernels, -may want to reduce the preferred alignment to -@option{-mpreferred-stack-boundary=2}. +This extra alignment does consume extra stack space, and generally +increases code size. Code that is sensitive to stack space usage, such +as embedded systems and operating system kernels, may want to reduce the +preferred alignment to @option{-mpreferred-stack-boundary=2}. @item -mmmx @itemx -mno-mmx |