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. Is it like j
, does it store or load any data?
It is a pseudo instruction. It is eqvivalent to jalr x0, x1, 0
. x1
holds the return address. Effectively jumping to the return address.
For more info on JALR see page 16 here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.