Instruction Model
PowerPC e500 Core Family Reference Manual, Rev. 1
Freescale Semiconductor
3-15
3.3.1.1.2
Integer Compare Instructions
The integer compare instructions algebraically or logically compare the contents of register rA
with either the zero-extended value of the UIMM operand, the sign-extended value of the SIMM
operand, or the contents of rB. The comparison is signed for cmpi and cmp and unsigned for
cmpli and cmpl.
Table 3-7
lists integer compare instructions. Note that the L bit must be 0 for
32-bit implementations.
The crD operand can be omitted if the result of the comparison is to be placed in CR0. Otherwise
the target CR field must be specified in crD by using an explicit field number.
For information on simplified mnemonics for the integer compare instructions see
Appendix C,
“Simplified Mnemonics for PowerPC Instructions
.”
3.3.1.1.3
Integer Logical Instructions
The logical instructions shown in
Table 3-8
perform bit-parallel operations on the specified
operands. Logical instructions with the CR updating enabled (uses dot suffix) and instructions
andi. and andis. set CR field CR0 to characterize the result of the logical operation. Logical
instructions do not affect XER[SO], XER[OV], or XER[CA].
See
Appendix C, “Simplified Mnemonics for PowerPC Instructions
,” for simplified mnemonic
examples for integer logical operations.
Table 3-7. Integer 32-Bit Compare Instructions (L = 0)
Name
Mnemonic
Syntax
Compare
cmp
cr
D,L,
r
A,
r
B
Compare Immediate
cmpi
cr
D,L,
r
A,SIMM
Compare Logical
cmpl
cr
D,L,
r
A,
r
B
Compare Logical Immediate
cmpli
cr
D,L,
r
A,UIMM
Table 3-8. Integer Logical Instructions
Name Mnemonic
Syntax
Implementation
Notes
AND
and (and.)
r
A
,r
S
,r
B
—
AND Immediate
andi.
r
A
,r
S
,
UIMM
—
AND Immediate Shifted
andis.
r
A
,r
S
,
UIMM
—
AND with Complement
andc
(
andc.
)
r
A
,r
S
,r
B
—
Count Leading Zeros Word
cntlzw (cntlzw.
)
r
A
,r
S
—
Equivalent
eqv
(
eqv.
)
r
A
,r
S
,r
B
—
Extend Sign Byte
extsb
(
extsb.
)
r
A
,r
S
—
Extend Sign Half Word
extsh
(
extsh.
)
r
A
,r
S
—
NAND
nand
(
nand.
)
r
A
,r
S
,r
B
—
NOR
nor
(
nor.
)
r
A
,r
S
,r
B
—
Содержание 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...