diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2012-06-22 18:27:58 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2012-06-22 11:27:58 -0700 |
commit | 50c7ad7e681f51d94310c47f82786657b0239262 (patch) | |
tree | 150e51769297d165225dfa93457839ac519e6681 | |
parent | 5bfb2af2774b43dc6cfd9a28b59a86a41d92e835 (diff) | |
download | gcc-50c7ad7e681f51d94310c47f82786657b0239262.zip gcc-50c7ad7e681f51d94310c47f82786657b0239262.tar.gz gcc-50c7ad7e681f51d94310c47f82786657b0239262.tar.bz2 |
Update -mpreferred-stack-boundary=3 warning
* doc/invoke.texi: Update -mpreferred-stack-boundary=3 warning.
From-SVN: r188900
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6ea4ed3..d0ebc5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2012-06-22 H.J. Lu <hongjiu.lu@intel.com> + * doc/invoke.texi: Update -mpreferred-stack-boundary=3 warning. + +2012-06-22 H.J. Lu <hongjiu.lu@intel.com> + PR target/53383 * doc/invoke.texi: Add a warning for -mpreferred-stack-boundary=3. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 029a7ab..87e0d1c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -13579,9 +13579,18 @@ the default is 4 (16 bytes or 128 bits). @strong{Warning:} When generating code for the x86-64 architecture with SSE extensions disabled, @option{-mpreferred-stack-boundary=3} can be -used to keep the stack boundary aligned to 8 byte boundary. You must -build all modules with @option{-mpreferred-stack-boundary=3}, including -any libraries. This includes the system libraries and startup modules. +used to keep the stack boundary aligned to 8 byte boundary. Since +x86-64 ABI require 16 byte stack alignment, this is ABI incompatible and +intended to be used in controlled environment where stack space is +important limitation. This option will lead to wrong code when functions +compiled with 16 byte stack alignment (such as functions from a standard +library) are called with misaligned stack. In this case, SSE +instructions may lead to misaligned memory access traps. In addition, +variable arguments will be handled incorrectly for 16 byte aligned +objects (including x87 long double and __int128), leading to wrong +results. You must build all modules with +@option{-mpreferred-stack-boundary=3}, including any libraries. This +includes the system libraries and startup modules. @item -mincoming-stack-boundary=@var{num} @opindex mincoming-stack-boundary |