IDT
Instruction Set
79RC32355 User Reference Manual
A - 62
November 4, 2002
Notes
JALR
Format:
JALR rs (rd = 31 implied)
JALR rd, rs
MIPS32
MIPS32
Purpose:
To execute a procedure call to an instruction address in a register
Description:
rd
←
return_addr, PC
←
rs
Place the return address link in GPR
rd
. The return link is the address of the second instruction
following the branch, where execution continues after a procedure call.
For processors that do not implement the MIPS16 ASE:
Jump to the effective target address in GPR
rs
. Execute the instruction that follows the
jump, in the branch delay slot, before executing the jump itself.
For processors that do implement the MIPS16 ASE:
Jump to the effective target address in GPR
rs
. Set the
ISA Mode
bit to the value in GPR
rs
bit 0. Bit 0 of the target address is always zero so that no Address Exceptions occur when
bit 0 of the source register is one
At this time the only defined hint field value is 0, which sets default handling of JALR. Future ver-
sions of the architecture may define additional hint values.
Restrictions:
Register specifiers
rs
and
rd
must not be equal, because such an instruction does not have the
same effect when re-executed. The result of executing such an instruction is undefined. This
restriction permits an exception handler to resume execution by re-executing the branch when an
exception occurs in the branch delay slot.
The effective target address in GPR
rs
must be naturally-aligned. For processors that do not
implement the MIPS16 ASE, if either of the two least-significant bits are not zero, an Address
Error exception occurs when the branch target is subsequently fetched as an instruction. For pro-
cessors that do implement the MIPS16 ASE, if bit 0 is zero and bit 1 is one, an Address Error
exception occurs when the jump target is subsequently fetched as an instruction.
Processor operation is
UNPREDICTABLE
if a branch, jump, ERET, DERET, or WAIT instruction
is placed in the delay slot of a branch or jump.
31
26 25
21 20
16 15
11 10
6 5
0
SPECIAL
000000
rs
0
00000
rd
hint
JALR
001001
6
5
5
5
5
6
Jump and Link Register
JALR