JALX 011101 |
instr_index |
6 |
26 |
JALX target |
MIPS32 with (microMIPS or MIPS16e), removed in Release 6 |
Jump and Link Exchange |
Jump and Link Exchange
To execute a procedure call within the current 256 MB-aligned region and change the ISA Mode from MIPS64 to microMIPS64 or MIPS16e.
Place the return address link in GPR 31. The return link is the address of the second instruction following the branch, at which location execution continues after a procedure call. The value stored in GPR 31 bit 0 reflects the current value of the ISA Mode bit.
This is a PC-region branch (not PC-relative); the effective target address is in the "current" 256 MB-aligned region.
The low 28 bits of the target address is the instr_index field shifted left 2 bits. The remaining upper bits are the corresponding bits of the address of the instruction in the delay slot (not the branch itself).
Jump to the effective target address, toggling the ISA Mode bit. Execute the instruction that follows the jump, in the branch delay slot, before executing the jump itself.
This instruction only supports 32-bit aligned branch target addresses.
Control Transfer Instructions (CTIs) should not be placed in branch delay slots. CTIs include all branches and jumps,
NAL, ERET, ERETNC, DERET, WAIT, and PAUSE.
Processor operation is UNPREDICTABLE if a control transfer instruction (CTI) is placed in the delay slot of a branch or jump.
If the microMIPS base architecture is not implemented and the MIPS16e ASE is not implemented, a Reserved
Instruction exception is initiated.
The JALX instruction has been removed in Release 6 and reused its opcode for DAUI. Pre-Release 6 code using
JALX cannot run on Release 6 by trap-and-emulate. Equivalent functionality is provided by the JIALC instruction added by Release 6.
I: GPR[31] = PC + 8 I+1: PC = PCGPRLEN-1..28 || instr_index || 02 ISAMode = (not ISAMode)
None
Forming the branch target address by concatenating PC and index bits rather than adding a signed offset to the PC is an advantage if all program code addresses fit into a 256 MB region aligned on a 256 MB boundary. It allows a branch from anywhere in the region to anywhere in the region, an action not allowed by a signed relative offset.
This definition creates the following boundary case: When the branch instruction is in the last word of a 256 MB region, it can branch only to the following 256 MB region containing the branch delay slot.