x86 stack frame padding
Jan Hubicka
jh@suse.cz
Wed May 29 04:59:00 GMT 2002
> void f1() { }
> void f2() { int x = 0; if (x) foo(); }
>
> F1 and F2 should, with -fomit-frame-pointer, compile to the
> same thing. Namely, just the return instruction. Unfortunately:
>
> f1:
> ret
>
> f2:
> subl $12, %esp
> addl $12, %esp
> ret
>
> Where in the world did that come from, you say? From the
> padding to align the stack for the function call, obviously.
> What function call? The one we got rid of. Doh.
Will this work for alloca blocks? I think preferred_stack_boundary
should not be set to 16 unless there is call or alloca, at least it is
supposed to work that way. I can check after finals what is going
wrong.
Honza
More information about the Gcc-patches
mailing list