日期:2014-05-16 浏览次数:20715 次
inline int test(int i)
{
return i+1;
}
int main(int argc, char *argv[])
{
int j=argc;
j=test(j);
printf("%d\n", j);
return 0;
}
.file "inline.c"
.text
.globl _test
.def _test; .scl 2; .type 32; .endef
_test:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
incl %eax
popl %ebp
ret
.def ___main; .scl 2; .type 32; .endef
.section .rdata,"dr"
LC0:
.ascii "%d\12\0"
.text
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
movl $16, %eax
call __alloca
call ___main
movl 8(%ebp), %eax
incl %eax
movl %eax, 4(%esp)
movl $LC0, (%esp)
call _printf
movl $0, %eax
leave
ret
.def _printf; .scl 2; .type 32; .endef