diff --git a/LICENSE.txt b/LICENSE.txt index 57e5704..eb18f51 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -10,7 +10,8 @@ Copyright (c) 2021, Zhiyuan Shao (zyshao@hust.edu.cn), Yixin Song (yixinsong@hust.edu.cn), Boyang Li (liboyang_hust@163.com), 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 Permission is hereby granted, free of charge, to any person obtaining diff --git a/chapter3_traps.md b/chapter3_traps.md index 44f8fbf..613b899 100644 --- a/chapter3_traps.md +++ b/chapter3_traps.md @@ -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 函数作为叶子调用函数)类似下图: fig1_2 diff --git a/pictures/fig1_2.png b/pictures/fig1_2.png index 56d4078..8e90812 100644 Binary files a/pictures/fig1_2.png and b/pictures/fig1_2.png differ