This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 PATCH for target/13685
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: jason at redhat dot com, gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Mon, 11 Sep 2006 22:47:01 -0700
- Subject: Re: i386 PATCH for target/13685
- References: <3240846298.1446260@mail.codesourcery.com>
On Mon, Sep 11, 2006 at 07:04:00PM -0700, Mark Mitchell wrote:
> Yes. Thanks,
>
> >>FWIW, I would strongly suggest that we use a fixed ABI independent of
> >>-Os, i.e., change the stack boundary to always be 128 bits. I believe
> >>that it should always be the case that code compiled with different -O
> >>options can be freely intermixed (whereas -f/-m options may change the
> >>ABI).
> >
> >This patch
> >
> >http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00298.html
> >
> >does that.
>
> This is a backwards-compatible ABI change for any existing -Os code,
> since the stack will still be at least as aligned as expected by any
> code out there at this point.
>
> So, this is OK, assuming no objections from the x86 maintainers within
> 48 hours.
>
>
> I checked it into mainline now. Is that OK for 4.1?
>
>
Here is a patch to update doc/invoke.texi. Is that OK for mainline
and 4.1?
H.J.
---
2006-09-11 H.J. Lu <hongjiu.lu@intel.com>
* doc/invoke.texi (mpreferred-stack-boundary): Remove exception
for -Os. Update __m128 alignment requirement.
--- gcc/doc/invoke.texi.align 2006-09-11 14:50:15.000000000 -0700
+++ gcc/doc/invoke.texi 2006-09-11 22:41:55.000000000 -0700
@@ -9505,15 +9505,13 @@ applicable to individual functions.
@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), 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 default is 4 (16 bytes or 128 bits).
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.
+Streaming SIMD Extension (SSE) data type @code{__m128} may not work
+properly if it is not 16 byte aligned.
To ensure proper alignment of this values on the stack, the stack boundary
must be as aligned as that required by any value stored on the stack.