x86 stack alignment redux

Jeffrey A Law law@cygnus.com
Sun Dec 14 22:41:00 GMT 1997


  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



More information about the Gcc mailing list