> The stack must be aligned before the return address is pushed:
> 
> The following C fragment
>         f(1);
>         f(2);
> 
> Translates to
> 
>         addl $-12,%esp
>         pushl $1
>         call f
>         addl $16,%esp
>         addl $-12,%esp
>         pushl $2
>         call f
>         addl $16,%esp
> 
> This assumes the stack is already aligned, of course.

That just keeps it aligned the same, *relatively*.  You have to cause
the compiler to generate something that must be aligned to a 16-byte
boundary to figure out at which point the stack pointer is assumed to
be aligned.

In fact, I think that the stack is aligned after pushing the previous
frame pointer, a 4-word struct with __attribute__((aligned(16))) is
placed starting at -32(%ebp).


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to