作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
push %ebp
push %esp, %ebp
push edi
push esi
push ebx
最佳答案
它是 x86 代码生成器的 gcc 实现细节。令人惊讶的是很难找到好的文档,我确实找到了 this page这是非常准确的。关键部分:
after ret instruction:
%eip contains return address
%esp points at arguments pushed by caller
called function may have trashed arguments
%eax contains return value (or trash if function is void)
%ecx, %edx may be trashed
%ebp, %ebx, %esi, %edi must contain contents from time of call
关于assembly - 为什么这些寄存器被压入堆栈?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9797335/
我是一名优秀的程序员,十分优秀!