[RISC-V] What's the equivalent instruction to a procedure return?
Answer
jump-and-link register (jalr)
Question
[RISC-V] What's the equivalent instruction to a procedure return?
Answer
?
Question
[RISC-V] What's the equivalent instruction to a procedure return?
Answer
jump-and-link register (jalr)
If you want to change selection, open original toplevel document below and click on "Move attachment"
Parent (intermediate) annotation
Open it and-link instruction jal x1, ProcedureLabel Executed by caller Puts address of instruction after this one in x1 (ra) (return address) Jumps to target address of ProcedureLabel Procedure return: <span>jump-and-link register instruction jalr x0, 0(x1) Executed by callee Like jal, but jumps to 0 + address in x1 (ra) No return address (x0 cannot be changed) Can also be used for unconditional jumps </