!5 修改了函数调用栈帧结构图

Merge pull request !5 from RogerLuo/master
pull/6/head
syivester 3 years ago committed by Gitee
commit d49cd21222
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -10,7 +10,8 @@ Copyright (c) 2021, Zhiyuan Shao (zyshao@hust.edu.cn),
Yixin Song (yixinsong@hust.edu.cn), Yixin Song (yixinsong@hust.edu.cn),
Boyang Li (liboyang_hust@163.com), Boyang Li (liboyang_hust@163.com),
Zichen Xu (xuzichen@hust.edu.cn), Zichen Xu (xuzichen@hust.edu.cn),
Wenzhuo Liu (mgt@oi-wiki.org) Wenzhuo Liu (mgt@oi-wiki.org),
Huan Luo (rogeeerluo@gmail.com)
Huazhong University of Science and Technology Huazhong University of Science and Technology
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining

@ -1667,7 +1667,9 @@ $ git merge lab1_3_irq -m "continue to work on lab1_challenge1"
提示: 提示:
理论上我们希望你了解函数调用时栈帧的结构通过fp寄存器(s0)寻找各个栈帧然而编译器一般会优化掉fp使得它的值始终为0在发生函数调用时也不保存这个寄存器实验的Makefile已经使用`-fno-omit-frame-pointer`禁止了此项优化。此时函数调用的栈帧类似下图: 理论上我们希望你了解函数调用时栈帧的结构通过fp寄存器(s0)寻找各个栈帧然而编译器一般会优化掉fp使得它的值始终为0在发生函数调用时也不保存这个寄存器实验的Makefile已经使用`-fno-omit-frame-pointer`禁止了此项优化。
第一章中的 [举例](chapter1_riscv.md#call_stack_structure) 程序中,函数调用的栈帧(此时 bar 函数作为叶子调用函数)类似下图:
<img src="pictures/fig1_2.png" alt="fig1_2" style="zoom:100%;" /> <img src="pictures/fig1_2.png" alt="fig1_2" style="zoom:100%;" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Loading…
Cancel
Save