This is the mail archive of the 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: i386 stack missalignment on main

On Jul 30, 2001, Jan Hubicka <> wrote:

> Mon Jul 30 15:25:00 CEST 2001  Jan Hubicka  <>

> 	* i386.c (ix86_output_main_function_alignment_hack): New function.

I believe it would be a better strategy to have a define_expand that
could be used to get the frame pointer aligned to any power of two.

I'm not sure whether this could be portably expanded after the
prologue, but at least we could have tests that would make sure the
frame pointer is not eliminated in favor of the stack pointer, and the
argument pointer is not eliminated in favor of the frame pointer, when
we introduce such stack-alignment in a function.

Then, we could have functions specify their own stack alignment
requirements upfront, or in automatic variables in their stack frames,
and we could generate alignment automatically and transparently.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

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