b
Branch
b target_addr (AA=0 LK=0)
Unconditionally branches to a target address relative to the current instruction pointer.
Encoding
Binary Layout
18
0:5
LI
6:29
AA
30
LK
31
Operands
-
LI
24-bit Signed Immediate (Displacement / 4) -
target_addr
Branch Target Address
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
Operation
if AA then
NIA ←iea EXTS(LI || 0b00)
else
NIA ←iea CIA + EXTS(LI || 0b00)
if LK then
LR ←iea CIA + 4
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.