b
Branch
b target_addr (AA=0 LK=0)
b+ target_addr (AA=1 LK=0)
ba target_addr (AA=0 LK=1)
ba+ target_addr (AA=1 LK=1)
b+ target_addr (AA=1 LK=0)
ba target_addr (AA=0 LK=1)
ba+ target_addr (AA=1 LK=1)
Unconditionally branches to a target address relative to the current instruction pointer.
Details
The branch target address is the sum of LI || 0b00 sign-extended and the address of this instruction, with the high-order 32 bits of the branch target address set to 0 in 32-bit mode.
Pseudocode Operation
Programming Note
The b instruction is used for unconditional branching. The AA and LK fields control whether the address is absolute or relative and whether to link back to the current instruction.
Example
b label
Encoding
Binary Layout
18
0
LI
6
AA
30
LK
31
Operands
-
LI
24-bit Signed Immediate (Displacement / 4) -
target_addr
Branch Target Address