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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With