函数调用过程

2024/4/12 13:42:58

从汇编角度看函数调用过程

本文以一个简单的程序为例&#xff0c;通过汇编代码查看函数调用过程&#xff0c;涉及如何开辟栈帧&#xff0c;函数如何返回等 #include <iostream> using namespace std;int sum(int a, int b) {int temp 0;temp a b;return temp; }int main() {int a 10;int b 2…