AN2491 Freescale Semiconductor / Motorola, AN2491 Datasheet - Page 18

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
Compare Word Simplified Mnemonics
Compare Word Simplified Mnemonics
Table 22 shows the simplified branch mnemonics and syntax for bclrl and bcctrl with LR updating.
5 Compare Word Simplified Mnemonics
In compare word instructions, the L operand indicates a word (L = 0) or double-word (L = 1). Simplified
mnemonics in Table 23 eliminate the L operand for word comparisons.
As with branch mnemonics, the crD field of a compare instruction can be omitted if CR0 is used, as shown
in examples 1 and 3 below. Otherwise, the target CR field must be specified as the first operand. The
following examples use word compare mnemonics:
18
1
2
3
4
Branch if less than
Branch if less than or equal
Branch if not greater than
Branch if equal
Branch if greater than or equal
Branch if not less than
Branch if greater than
Branch if not equal
Branch if summary overflow
Branch if unordered
Branch if not summary overflow
Branch if not unordered
Table 22. Simplified Mnemonics for bclrl and bcctrl with Comparison Conditions and LR Update
The value in the BI operand selects CRn[0], the LT bit.
The value in the BI operand selects CRn[1], the GT bit.
The value in the BI operand selects CRn[2], the EQ bit.
The value in the BI operand selects CRn[3], the SO bit.
1. Compare rA with immediate value 100 as signed 32-bit integers and place result in CR0.
2. Same as (1), but place results in CR4.
3. Compare rA and rB as unsigned 32-bit integers and place result in CR0.
Branch Semantics
cmpwi rA,100
cmpwi cr4,rA,100
cmplw rA,rB
Compare Word Immediate
Compare Word
Compare Logical Word Immediate cmplwi crD,rA,UIMM
Compare Logical Word
Simplified Mnemonics for PowerPC™ Instructions
Operation
Table 23. Word Compare Simplified Mnemonics
Freescale Semiconductor, Inc.
For More Information On This Product,
bclrl 12,BI
bclrl 12,BI
bclrl 12,BI
bclrl 12,BI2,target
bclrl 4,BI
bclrl 4,BI
bclrl 4,BI
bclrl 4,BI
bclrl
Go to: www.freescale.com
equivalent to
equivalent to
equivalent to
1
3
4
2
,target
,target
,target
1
3
4
,target
,target
,target
,target
Simplified Mnemonic
cmpwi crD,rA,SIMM
cmpw crD,rA,rB
cmplw crD,rA,rB
bnglrl crS,target
beqlrl crS,target
bgelrl crS,target
bnelrl crS,target
bsolrl crS,target
bunlrl crS,target
bnslrl crS,target
bnulrl crS,target
bgtlrl crS,target
blelrl crS,target
bnllrl crS,target
bltlrl crS,target
Mnemonic
Simplified
bcctrl 12,BI
bcctrl 12,BI
bcctrl 12,BI
bcctrl 12,BI
bcctrl 4,BI
bcctrl 4,BI
bcctrl 4,BI
bcctrl 4,BI
cmpi crD,0,rA,SIMM
cmp crD,0,rA,rB
cmpli crD,0,rA,UIMM
cmpl crD,0,rA,rB
Equivalent to:
cmpi 0,0,rA,100
cmpi 4,0
cmpl 0,0,rA,rB
bcctrl
2
1
3
4
1
3
2
4
,target
,target
,target
,target
,target
,target
,target
,target
,
rA,100
bngctrl crS,target
beqctrl crS,target
bgectrl crS,target
bnectrl crS,target
bsoctrl crS,target
bunctrl crS,target
bnsctrl crS,target
bnuctrl crS,target
bnlctrl crS,target
bgtctrl crS,target
blectrl crS,target
bltctrl crS,target
Mnemonic
Simplified
MOTOROLA

Related parts for AN2491