This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x86 stack alignment redux
- To: pgc at goof dot com
- Subject: Re: x86 stack alignment redux
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 14 Dec 1997 23:44:02 -0700
- Cc: egcs at cygnus dot com
- Reply-To: egcs at cygnus dot com
In message <19971212171051.08257@cerebro.laendle>you write:
> > I don't think it is a good idea. Please check out Marc's patch.
>
> defining STACK_BOUNDARY should not affect compatibility issues, but
> (in pgcc), I found a bug (which I couldn't track down yet), which is
> affect by STACK_BOUNDARY==64.. sometimes, combine will optimize
Yes it does.
If a function doesn't keep the stack rounded to the appropriate boundary
then bad things will happen.
> lea 16(%esp),%ebx
> addl $4,%ebx
>
> into
>
> lea 16(%esp),%ebx
> orb $4,%ebx
Yes. The combiner will make this transformation if it believes all the
effected low order bits are zero.
> when another push is added in the prologue (to save registers), the orb is
> no longer valid.
Right, but if STACK_BOUNDARY is defined to 64bits, then the prologue is
responsible for always maintaining that boundary.
jeff