This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Arranging for -Os to imply -mpreferred-stack-boundary=2 on x86
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: Arranging for -Os to imply -mpreferred-stack-boundary=2 on x86
- From: Geert Bosch <bosch at gnat dot com>
- Date: Wed, 24 Oct 2001 16:45:16 -0400 (EDT)
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
On Wed, 24 Oct 2001, Richard Henderson wrote:
On Wed, Oct 24, 2001 at 02:38:42PM -0400, Geert Bosch wrote:
> On Wed, 24 Oct 2001, Richard Henderson wrote:
> I'd rather detect the required alignment of a function than use
> an attribute. Much friendlier when interacting with SSE code
> that doesn't just prefer 16 byte alignment, but requires it.
[...]
> 3. assume the stack may be misaligned and do alignment in the prologue of f
I mean this. For functions that do not call alloca, this
is as cheap as a single instruction in the prologue. If
alloca is used as well, then we need extra registers and
things get uglier.
This would be best if the overhead is indeed just one or two instructions,
but I thought doing alignment requires the use of an extra register
(framepointer) even if we have a fixed size stack frame. How can we
access the arguments without doing this?
-Geert