Encoding:

BALC

101101

offset

6

26

Format:

BALC offset

microMIPS32 Release 6

Branch and Link, Compact

Purpose:

Branch and Link, Compact

To do an unconditional PC-relative procedure call.

Description:

procedure_call (no delay slot)

Place the return address link in GPR 31. The return link is the address of the instruction immediately following the branch, where execution continues after a procedure call. (Because compact branches have no delay slots, see below.)

A 27-bit signed offset (the 26-bit offset field shifted left 1 bits) is added to the address of the instruction following the branch (not the branch itself), to form a PC-relative effective target address.

Compact branches do not have delay slots. The instruction after the branch is NOT executed when the branch is taken.

Restrictions:

Any instruction, including a branch or jump, may immediately follow a branch or jump, that is, delay slot restrictions do not apply in Release 6.

Availability and Compatibility:

This instruction is introduced by and required as of Release 6.

Exceptions:

None

Operation:

target_offset = sign_extend( offset || 01 )
GPR[31] = PC+4
PC = PC+4 + sign_extend(target_offset)