PowerPC e500 Core Family Reference Manual, Rev. 1
C-4 Freescale Semiconductor
Simplified Mnemonics for PowerPC Instructions
C.4 Branch Instruction Simplified Mnemonics
Branch conditional instructions can be coded with the operations, a condition to be tested, and a
prediction, as part of the instruction mnemonic rather than as numeric operands (the BO and BI
operands). Table C-4 shows the four general types of branch instructions. Simplified mnemonics
are defined only for branch instructions that include BO and BI operands; there is no need to
simplify unconditional branch mnemonics.
The BO and BI operands correspond to two fields in the instruction opcode, as Figure C-1 shows
for Branch Conditional (bc, bca, bcl, and bcla) instructions.
Figure C-1. Branch Conditional (bc) Instruction Format
The BO operand specifies branch operations that involve decrementing CTR. It is also used to
determine whether testing a CR bit causes a branch to occur if the condition is true or false.
The BI operand identifies a CR bit to test (whether a comparison is less than or greater than, for
example). The simplified mnemonics avoid the need to memorize the numerical values for BO and
BI.
For example, bc 16,0,target is a conditional branch that, as a BO value of 16 (0b1_0000) indicates,
decrements the CTR, then branches if the decremented CTR is not zero. The operation specified
by BO is abbreviated as d (for decrement) and nz (for not zero), which replace the c in the original
mnemonic; so the simplified mnemonic for bc becomes bdnz. The branch does not depend on a
condition in the CR, so BI can be eliminated, reducing the expression to bdnz target.
In addition to CTR operations, the BO operand provides an optional prediction bit and a true or
false indicator can be added. For example, if the previous instruction should branch only on an
equal condition in CR0, the instruction becomes bc 8,2,target. To incorporate a true condition, the
BO value becomes 8 (as shown in Table C-6); the CR0 equal field is indicated by a BI value of 2
(as shown in Table C-7). Incorporating the branch-if-true condition adds a ātā to the simplified
mnemonic, bdnzt. The equal condition that is specified by a BI value of 2 (indicating the EQ bit
Table C-4. Branch Instructions
Instruction Name Mnemonic Syntax
Branch b (ba bl bla) target_addr
Branch Conditional bc (bca bcl bcla) BO,BI,target_addr
Branch Conditional to Link Register bclr (bclrl) BO,BI
Branch Conditional to Count Register bcctr (bcctrl) BO,BI
0 5 6 1011 1516 293031
0 0 1 0 0 0 BO BI BD AA LK