MIT6.S081 icon indicating copy to clipboard operation
MIT6.S081 copied to clipboard

lec05 5.4 RISC-V寄存器

Open imabackstabber opened this issue 2 years ago • 0 comments

参考链接中这样描述Caller和Callee寄存器

Caller-saved registers (AKA volatile registers, or call-clobbered) are used to hold temporary quantities that need not be preserved across calls.

For that reason, it is the caller's responsibility to push these registers onto the stack or copy them somewhere else if it wants to restore this value after a procedure call.

在课程翻译中,翻译如下:

表单中的第4列,Saver列,当我们在讨论寄存器的时候也非常重要。它有两个可能的值Caller,Callee。我经常混淆这两个值,因为它们只差一个字母。我发现最简单的记住它们的方法是: Caller Saved寄存器在函数调用的时候不会保存 Callee Saved寄存器在函数调用的时候会保存

和参考链接中似乎有冲突

imabackstabber avatar Aug 27 '22 07:08 imabackstabber