Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

JAL / JALR

jal  rd, label
jalr rd, offset(rs1)

Both write the address of the following instruction to rd and jump. call label conventionally writes ra; j label discards the link in x0; ret is a jalr through ra with its link discarded.

x86 connection: call, jmp, and ret are conventions over these two instructions. Unlike x86 call, JAL does not push a return address to memory.