Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lec05 5.4 RISC-V寄存器 #41

Open
imabackstabber opened this issue Aug 27, 2022 · 0 comments
Open

lec05 5.4 RISC-V寄存器 #41

imabackstabber opened this issue Aug 27, 2022 · 0 comments

Comments

@imabackstabber
Copy link

参考链接中这样描述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寄存器在函数调用的时候会保存

和参考链接中似乎有冲突

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant