Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Making a RISC-V Operating System Using Rust. Parent comment
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.
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