PowerPC e500 Core Family Reference Manual, Rev. 1
C-20
Freescale Semiconductor
Simplified Mnemonics for PowerPC Instructions
C.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 C-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:
1. Compare rA with immediate value 100 as signed 32-bit integers and place result in CR0.
cmpwi rA,100
equivalent to
cmpi 0,0,rA,100
2. Same as (1), but place results in CR4.
cmpwi cr4,rA,100
equivalent to
cmpi 4,0
,
rA,100
3. Compare rA and rB as unsigned 32-bit integers and place result in CR0.
cmplw rA,rB equivalent
to
cmpl 0,0,rA,rB
C.6
Condition Register Logical Simplified Mnemonics
The CR logical instructions, shown in
Table C-24
, can be used to set, clear, copy, or invert a given
CR bit. Simplified mnemonics allow these operations to be coded easily. Note that the symbols
defined in
Table C-8
can be used to identify the CR bit.
Table C-23. Word Compare Simplified Mnemonics
Operation
Simplified Mnemonic
Equivalent to:
Compare Word Immediate
cmpwi
cr
D
,r
A
,
SIMM
cmpi
cr
D
,0,r
A
,
SIMM
Compare Word
cmpw
cr
D
,r
A
,r
B
cmp
cr
D
,0,r
A
,r
B
Compare Logical Word Immediate
cmplwi
cr
D
,r
A
,
UIMM
cmpli
cr
D
,0,r
A
,
UIMM
Compare Logical Word
cmplw
cr
D
,r
A
,r
B
cmpl
cr
D
,0,r
A
,r
B
Table C-24. Condition Register Logical Simplified Mnemonics
Operation
Simplified Mnemonic
Equivalent to
Condition register set
crset b
x
creqv b
x
,b
x
,b
x
Condition register clear
crclr b
x
crxor b
x
,b
x
,b
x
Condition register move
crmove b
x
,b
y
cror b
x
,b
y
,b
y
Condition register not
crnot b
x
,b
y
crnor b
x
,b
y
,b
y
Содержание PowerPC e500 Core
Страница 1: ...PowerPC e500 Core Family Reference Manual Supports e500v1 e500v2 E500CORERM Rev 1 4 2005...
Страница 36: ...PowerPC e500 Core Family Reference Manual Rev 1 xxxvi Freescale Semiconductor...
Страница 38: ...PowerPC e500 Core Family Reference Manual Rev 1 Part I 2 Freescale Semiconductor...
Страница 316: ...PowerPC e500 Core Family Reference Manual Rev 1 7 18 Freescale Semiconductor Performance Monitor...
Страница 332: ...PowerPC e500 Core Family Reference Manual Rev 1 Part II 2 Freescale Semiconductor...
Страница 362: ...PowerPC e500 Core Family Reference Manual Rev 1 10 26 Freescale Semiconductor Auxiliary Processing Units APUs...
Страница 440: ...PowerPC e500 Core Family Reference Manual Rev 1 A 8 Freescale Semiconductor Programming Examples...
Страница 444: ...PowerPC e500 Core Family Reference Manual Rev 1 B 4 Freescale Semiconductor Guidelines for 32 Bit Book E...
Страница 530: ...Opcode Listings PowerPC e500 Core Family Reference Manual Rev 1 D 50 Freescale Semiconductor...
Страница 534: ...PowerPC e500 Core Family Reference Manual Rev 1 E 4 Freescale Semiconductor Revision History...