ba
Branch Absolute
ba target_addr
Unconditionally branches to an absolute address.
Encoding
Binary Layout
18
0:5
LI
6:29
1
30
LK
31
Operands
-
LI
24-bit Signed Immediate (Address / 4)
Example
ba 0x1000
// Jump to address 0x1000.
Related
More in Base
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Unconditionally branches to an absolute address formed by sign-extending the 24-bit immediate LI and shifting left by 2 bits. The Link Register is not modified unless LK=1. This instruction does not check any condition bits.
Operation
NIA ← (LI || 0b00)
if LK = 1 then LR ← CIA + 4
Programming Note
When LK=1, the address of the next sequential instruction is placed in LR, making this a subroutine call. Use blr to return.