Branch Instructions; Cr Logical Instructions; Rotate Instructions; Table 3-28. Branch Instructions - IBM PowerPC 405GP User Manual

Embedded processor
Table of Contents

Advertisement

3.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 LA.
See "Branch Processing" on page 3-34 for more information on branch operations.
Table 3-28 lists the PPC405GP branch instructions. In the table, the syntax "[I]" 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).
Table 3-28. Branch Instructions
Branch
3.11.6.1 CR Logical Instructions
b[IHa]
bc[l][a]
bcctr[l]
bclr[l]
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 3-29 lists the PPC405GP condition register logical instructions.
Table 3-29. CR Logical Instructions
crand
crnor
crandc
cror
creqv
crorc
crnand
crxor
mcrf
3.11.6.2 Rotate Instructions
These instructions rotate operands stored in the GPRs. Rotate instructions can also mask rotated
operands.
Table 3-30 lists the PPC405GP rotate instructions. In the table, the syntax "[.]" indicates that the
instruction has a "record" form that updates CR[CRO], and a "non-record" form.
Table 3-30. Rotate Instructions
Rotate and Insert Rotate and Mask
rlwimi[.]
rlwinm[.]
rlwnm[.]
Preliminary
Programming Model
3-51

Advertisement

Table of Contents
loading

Table of Contents