No. An ordinary jump instruction has its one jump
target encoded as an unchanging part of the instruction.
(like j someSpot
).
jr
Instruction
The
jr
instruction returns control to
the caller.
It copies the contents of $ra
into the PC:
jr $ra # PC <― $ra
Usually you think of this as "jumping to the address in $ra."
To make the instruction more general, it can be
used with any register, not just $ra
.
Like all jump and branch instructions,
the jr
instruction is
followed by a branch delay.
The diagram shows the subroutine returning
to the return address that was loaded into $ra
by the jal
instruction in the caller.