This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: x86 stack alignment redux



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]