On Wed, 13 Dec 2000, Alfred Perlstein wrote:
> David, can you look at this?
>
> #include <fcntl.h>
>
> int foo() {
> open("file", O_RDONLY);
> return 0;
> }
> int main() {
> int x;
> x = foo();
> return 0;
> }
>
> results in:
>
> foo:
> pushl %ebp
> movl %esp,%ebp
> subl $8,%esp
> addl $-8,%esp
> pushl $0
> pushl $.LC0
> call open
> xorl %eax,%eax
> leave
> ret
>
> why the subl then addl?
>
Well, as a thoroughly rough guess, the subl is probably to create space
on the stack for the args, and the addl is to align the stack to a 16
byte address?
I know that the PowerPC ABI wants that, but no idea about x86.
Iain
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message