2-40 PPC405 Core User’s Manual
2.11.6 Branch Instructions
These instructions unconditionally or conditionally branch to an address. Conditional branch
instructions can test condition codes set by a previous instruction and branch accordingly. Conditional
branch instructions can also decrement and test the CTR as part of branch determination, and can
save the return address in the LR.The target address for a branch can be a displacement from the
current instruction address (a relative address), an absolute address, or contained in the CTR or LR.
See “Branch Processing” on page 2-24 for more information on branch operations.
Table 2-17 lists the PPC405 branch instructions. In the table, the syntax “[l]” indicates that the
instruction has a “link update” form that updates LR with the address of the instruction after the
branch, and a “non-link update” form. The syntax “[a]” indicates that the instruction has an “absolute
address” form, in which the target address is formed directly using the immediate field specified as
part of the instruction, and a “relative” form, in which the target address is formed by adding the
immediate field to the address of the branch instruction).
2.11.6.1 CR Logical Instructions
These instructions perform logical operations on a specified pair of bits in the CR, placing the result in
another specified bit. These instructions can logically combine the results of several comparisons
without incurring the overhead of conditional branch instructions. Software performance can
significantly improve if multiple conditions are tested at once as part of a branch decision.
Table 2-18 lists the PPC405 condition register logical instructions.
2.11.6.2 Rotate Instructions
These instructions rotate operands stored in the GPRs. Rotate instructions can also mask rotated
operands.
Table 2-19 lists the PPC405 rotate instructions. In the table, the syntax “[.]” indicates that the
instruction has a “record” form that updates CR[CR0], and a “non-record” form.
Table 2-17. Branch Instructions
Branch
b[l][a]
bc[l][a]
bcctr[l]
bclr[l]
Table 2-18. CR Logical Instructions
crand
crandc
creqv
crnand
crnor
cror
crorc
crxor
mcrf
Table 2-19. Rotate Instructions
Rotate and Insert Rotate and Mask
rlwimi[.] rlwinm[.]
rlwnm[
.]