News for hackers. Stuff that matters.
Re:Making a RISC-V Operating System Using Rust by Taniwha on Wednesday June 14, 2023 @05:53AM (#36323613)
Either: "jal lr, dest" or "jalr lr, offset(reg)"

Both save the address of the next instruction in lr, the first is a relative branch the second is to the address pointed by a register plus an offset

Use "jalr r0, 0(lr)" to return

Anything else is just syntactic sugar in the assembler to set up the reg for jalr

There are no comments on this comment yet.