b
Branch
PPC440x5 CPU Core User’s Manual Preliminary
Page 268 of 589 instrset.fm.
September 12, 2002
b
Branch
If AA = 1 then
LI target6:29
NIA EXTS(LI || 20)
else
LI (target – CIA)6:29
NIA CIA + EXTS(LI || 20)
if LK = 1 then
(LR) CIA + 4
PC NIA
The next instruction address (NIA) is the effective address of the branch target. The NIA is formed by adding
a displacement to a base address. The displacement is obtained by concatenating two 0-bits to the right of
the LI field and sign-extending the result to 32 bits.
If the AA field contains 0, the base address is the address of the branch instruction, which is the current
instruction address (CIA). If the AA field contains 1, the base address is 0.
Instruction execution resumes with the instruction at the NIA.
If the LK field contains 1, then (CIA + 4) is placed into the LR.
Registers Altered
LR if LK contains 1
btarget AA=0, LK =0
ba target AA=1, LK =0
bl target AA=0, LK =1
bla target AA=1, LK =1
18 LI AA LK
06 30 31