No. An ordinary jump instruction has its
target encoded as an unchanging part of the instruction.
instruction returns control to
It copies the contents of
$ra into the PC:
jr $ra # PC <― $ra # A branch delay # slot follows this instruction.
Usually you think of this as "jumping
to the address in
To make the instruction more general, it can be
used with any register, not just
Like all jump and branch instructions,
jr instruction is
followed by a branch delay.
The diagram shows the subroutine returning
to the return address that was loaded into
jal instruction in the caller.
Do we now have a mechanism that enables us to call the same subroutine from many points in a program?