Update -mpreferred-stack-boundary=3 warning
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 22 Jun 2012 18:27:58 +0000 (18:27 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 22 Jun 2012 18:27:58 +0000 (11:27 -0700)
* doc/invoke.texi: Update -mpreferred-stack-boundary=3 warning.

From-SVN: r188900

gcc/ChangeLog
gcc/doc/invoke.texi

index 6ea4ed38a9bf1a7ee9a3cb671afc78c1c54e5454..d0ebc5a797408f439efd63d442d160ce58b09b48 100644 (file)
@@ -1,3 +1,7 @@
+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
index 029a7ab0ad2e3316f12e1251724c42a7c746c70f..87e0d1c19160bfd5001bbcd5eef7018c63a1dedb 100644 (file)
@@ -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