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
10 11
15 16
29 30 31
0
0
1
0
0
0
BO
BI
BD
AA LK
Summary of Contents for PowerPC e500 Core
Page 1: ...PowerPC e500 Core Family Reference Manual Supports e500v1 e500v2 E500CORERM Rev 1 4 2005...
Page 36: ...PowerPC e500 Core Family Reference Manual Rev 1 xxxvi Freescale Semiconductor...
Page 38: ...PowerPC e500 Core Family Reference Manual Rev 1 Part I 2 Freescale Semiconductor...
Page 332: ...PowerPC e500 Core Family Reference Manual Rev 1 Part II 2 Freescale Semiconductor...
Page 530: ...Opcode Listings PowerPC e500 Core Family Reference Manual Rev 1 D 50 Freescale Semiconductor...
Page 534: ...PowerPC e500 Core Family Reference Manual Rev 1 E 4 Freescale Semiconductor Revision History...