简体   繁体   English

组装什么是ret?

[英]Assembly what is ret?

I am new to assembly and I saw the following line of code我是汇编新手,我看到了以下代码行

ret

What does it do?它有什么作用? I looked in my RiscV Green Card but didn't find it.我查看了我的 RiscV 绿卡,但没有找到。 Is it like j , does it store or load any data?它像j吗,它是否存储或加载任何数据?

It is a pseudo instruction.这是一条伪指令。 It is eqvivalent to jalr x0, x1, 0 .它等效于jalr x0, x1, 0 x1 holds the return address. x1保存返回地址。 Effectively jumping to the return address.有效跳转到返回地址。

For more info on JALR see page 16 here .有关 JALR 的更多信息,请参见此处的第 16 页。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM