This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -malign-double switch patch?
Nix wrote:
> > Apparently you didn't read the documentation, in which it is said
> > that the switch affects the abi, and therefore should be used only
> > with extreme caution under controled conditions.
>
> GCC-3.1.x's manual says
>
> ,----
> | `-malign-double'
> | `-mno-align-double'
> | Control whether GCC aligns `double', `long double', and `long
> | long' variables on a two word boundary or a one word boundary.
> | Aligning `double' variables on a two word boundary will produce
> | code that runs somewhat faster on a `Pentium' at the expense of
> | more memory.
> `----
>
> i.e., it doesn't mention the ABI breakage :( perhaps this is only in the
> trunk...
The next paragraph says:
*Warning:* if you use the `-malign-double' switch, structures
containing the above types will be aligned differently than the
published application binary interface specifications for the 386.
Now, if you're not using structures, perhaps it isn't obvious that you
can still have ABI breakage... (Argument alignment on the stack
changes, doesn't it?)
-- Jamie