EasyManua.ls Logo

Freescale Semiconductor PowerPC e500 Core - Key Facts about Simplified Branch Mnemonics; Eliminating the BO Operand

Default Icon
548 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Simplified Mnemonics for PowerPC Instructions
PowerPC e500 Core Family Reference Manual, Rev. 1
Freescale Semiconductor C-5
in CR0) is replaced by the eq symbol. Using the simplified mnemonic and the eq operand, the
expression becomes bdnzt eq
,target.
This example tests CR0[EQ]; however, to test the equal condition in CR5 (CR bit 22), the
expression becomes bc 8,22,target. The BI operand of 22 indicates CR[22] (CR5[2], or BI field
0b10110), as shown in Table C-7. This can be expressed as the simplified mnemonic.
bdnzt 4 * cr5 + eq,target.
The notation, 4 * cr5 + eq may at first seem awkward, but it eliminates computing the value of the
CR bit. It can be seen that (4 * 5) + 2 = 22. Note that although 32-bit registers in Book E processors
are numbered 32–63, only values 0–31 are valid (or possible) for BI operands. As shown in
Table C-8, a Book E–compliant processor automatically translates the bit values; specifying a BI
value of 22 selects bit 54 on a Book E processor, or CR5[2] = CR5[EQ].
C.4.1 Key Facts about Simplified Branch Mnemonics
The following key points are helpful in understanding how to use simplified branch mnemonics:
All simplified branch mnemonics eliminate the BO operand, so if any operand is present in
a branch simplified mnemonic, it is the BI operand (or a reduced form of it).
If the CR is not involved in the branch, the BI operand can be deleted
If the CR is involved in the branch, the BI operand can be treated in the following ways:
It can be specified as a numeric value, just as it is in the architecturally defined
instruction, or it can be indicated with an easier to remember formula, 4 * crn + [test bit
symbol], where n indicates the CR field number.
The condition of the test bit (eq, lt, gt, and so) can be incorporated into the mnemonic,
leaving the need for an operand that defines only the CR field.
If the test bit is in CR0, no operand is needed.
If the test bit is in CR1–CR7, the BI operand can be replaced with a crS operand (that
is, cr1, cr2, cr3, and so forth.
C.4.2 Eliminating the BO Operand
The 5-bit BO field, shown in Figure C-2, encodes the following operations in conditional branch
instructions:
Decrement count register (CTR)
And test if result is equal to zero
And test if result is not equal to zero

Table of Contents

Related product manuals