Motorola MPC823e Reference Manual page 1185

Microprocessor for mobile computing
Table of Contents

Advertisement

cmp
Assembler Syntax
BIT
0
1
2
FIELD
31
BIT
16
17
18
FIELD
B
Definition
Operation
Description
MOTOROLA
cmp
crfD,L,rA,rB
3
4
5
6
7
CRFD
19
20
21
22
23
Compare
a ← EXTS(rA)
b ← EXTS(rB)
if a < b then c ← 0b100
else if a > b then c ← 0b010
else c ← 0b001
CR[4 ∗ crfD–4 ∗ crfD + 3] ← c || XER[SO]
The contents of rA are compared with the contents of rB 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:
cmpd
rA,rB
cmpw
cr3,rA,rB
POWERPC ARCHITECTURE
LEVEL
UISA
MPC823e REFERENCE MANUAL
MPC823e Instruction Set—cmp
8
9
10
11
12
0
L
24
25
26
27
28
0000000000
equivalent to
cmp
equivalent to
cmp
SUPERVISOR
OPTIONAL
LEVEL
13
14
15
A
29
30
31
0
0,1,rA,rB
3,0,rA,rB
FORM
X
B-27

Advertisement

Table of Contents
loading

Table of Contents