Motorola MPC823e Reference Manual page 1186

Microprocessor for mobile computing
Table of Contents

Advertisement

MPC823e Instruction Set—cmpi
cmpi
Assembler Syntax
BIT
0
1
2
FIELD
11
BIT
16
17
18
FIELD
Definition
Operation
Description
B-28
cmpi
crfD,L,rA,SIMM
3
4
5
6
7
CRFD
19
20
21
22
23
SIMM
Compare Immediate
a ← (rA)
if a < EXTS(SIMM) then c ← 0b100
else if a > EXTS(SIMM) then c ← 0b010
else c ← 0b001
CR[4 ∗ crfD–4 ∗ crfD + 3] ← c || XER[SO]
The contents of rA are compared with the sign-extended value
of the SIMM field, treating the operands as signed integers. The
result of the comparison is placed into CR field crfD.
Other registers altered:
Condition Register (CR field specified by operand crfD):
Affected: LT, GT, EQ, SO
Simplified mnemonics:
cmpdi rA,value
cmpwi
cr3,rA,value
POWERPC ARCHITECTURE
LEVEL
UISA
MPC823e REFERENCE MANUAL
8
9
10
11
12
0
L
24
25
26
27
28
equivalent to
cmpi
equivalent to
cmpi
SUPERVISOR
OPTIONAL
LEVEL
13
14
15
A
29
30
31
0,1,rA,value
3,0,rA,value
FORM
D
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents