Changing Stack Frame in x86...

Alexandre Oliva aoliva@redhat.com
Tue Jul 10 11:50:00 GMT 2001


On Jul 10, 2001, "Jeffrey A. Six" <jeffsix@thecouch.ncsc.mil> wrote:

> I have modified the function prologue and epilogue code generation
> routines so that this new value is pushed onto the stack before the
> function's stack frame is setup, so that this new value is stored
> right next to the return address.  The epilogue pops this new value
> off right before generating the return instruction.  The problem is
> that this screws up passing parameters into functions, as the
> offsets from %esp generated by the compiler are now wrong since I've
> pushed an extra value onto the stack.

You'll have to adjust the elimination offsets too.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-help mailing list