AN2491 Freescale Semiconductor / Motorola, AN2491 Datasheet - Page 6

no-image

AN2491

Manufacturer Part Number
AN2491
Description
Simplified Mnemonics for PowerPC Instructions
Manufacturer
Freescale Semiconductor / Motorola
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2491NFHP
Manufacturer:
PANASON
Quantity:
5 510
Part Number:
AN2491NFHP
Manufacturer:
MAXIM
Quantity:
5 510
1
2
3
4
5
Branch Instruction Simplified Mnemonics
Branch Instruction Simplified Mnemonics
Thus, a BO encoding of 10100 (decimal 20) means ignore the CR bit comparison and do not decrement the
CTR—in other words, branch unconditionally. Encodings for the BO operand are shown in Table 6. A z bit
indicates that the bit is ignored. However, these bits should be cleared, as they may be assigned a meaning
in a future version of the architecture.
As shown in Table 6, the ‘c’ in the standard mnemonic is replaced with the operations otherwise specified
in the BO field, (d for decrement, z for zero, nz for non-zero, t for true, and f for false).
4.3 Incorporating the BO Branch Prediction
As shown in Table 6, the low-order bit (y bit) of the BO field provides a hint about whether the branch is
likely to be taken (static branch prediction). Assemblers should clear this bit unless otherwise directed. This
default action indicates the following:
If the likely outcome (branch or fall through) of a given branch conditional instruction is known, a suffix
can be added to the mnemonic that tells the assembler how to set the y bit. That is, ‘+’ indicates that the
branch is to be taken and ‘–’ indicates that the branch is not to be taken. This suffix can be added to any
branch conditional mnemonic, either standard or simplified.
6
BO Field
1z
1z
1z
001z
011z
0000y
0001y
0100y
0101y
Assumes y = z = 0. Section 4.3, “Incorporating the BO Branch Prediction,” describes how to use simplified mnemonics
to program the y bit for static prediction.
A z bit indicates a bit that is ignored. However, these bits should be cleared, as they may be assigned a meaning in a
future version of the architecture.
Instructions for which B0 is 12 (branch if condition true) or 4 (branch if condition false) do not depend on the CTR value
and can be alternately coded by incorporating the condition specified by the BI field, as described in Section 4.6,
"Simplified Mnemonics that Incorporate CR Conditions (Eliminates BO and Replaces BI with crS).”
Simplified mnemonics for branch instructions that do not test CR bits (BO = 16, 18, and 20) should specify only a
target. Otherwise a programming error may occur.
Notice that these instructions do not use the branch if condition true or false operations. For that reason, simplified
mnemonics for these should not specify a BI operand.
2
2
2
01y
00y
1zz
2
2
y
y
4
4
4
A branch conditional with a negative displacement field is predicted to be taken.
A branch conditional with a non-negative displacement field is predicted not to be taken (fall
through).
A branch conditional to an address in the LR or CTR is predicted not to be taken (fall through).
(Decimal)
Value
10
12
16
18
20
0
2
4
8
1
Decrement the CTR, then branch if the decremented CTR 0 and condition is FALSE.
Decrement the CTR, then branch if the decremented CTR = 0 and condition is FALSE.
Branch if the condition is FALSE.
Decrement the CTR, then branch if the decremented CTR 0 and condition is TRUE.
Decrement the CTR, then branch if the decremented CTR = 0 and condition is TRUE.
Branch if the condition is TRUE.
Decrement the CTR, then branch if the decremented CTR
Decrement the CTR, then branch if the decremented CTR = 0.
Branch always.
Simplified Mnemonics for PowerPC™ Instructions
Freescale Semiconductor, Inc.
For More Information On This Product,
Table 6. BO Operand Encodings
Go to: www.freescale.com
3
3
Note that ‘true’ and ‘twelve’ both start with ‘t’.
Note that ‘false’ and ‘four’ both start with ‘f’.
Description
0.
MOTOROLA
Symbol
dnz
dnzf
dnzt
dz
dzf
dzt
f
t
5
5

Related parts for AN2491