为什么我们总是这样做
pushl %ebp # save the old base pointer
movl %esp, %ebp # set ebp to the current esp
movl %ebp, %esp
popl %ebp
^这个,在汇编中定义函数时?
下面是我的一些代码的翻译,没有用于访问变量的推送和弹出以及esp寄存器。
asm(
"_calculateA:;"
" movl 8(%esp), %eax;"
" andl 4(%esp), %eax;"
" ret;"
);
它更短,工作正常,那么这笔交易是什么?