
CPU32
REFERENCE MANUAL
INSTRUCTION SET
MOTOROLA
4-7
4.3.3 Integer Arithmetic Operations
The arithmetic operations include the four basic operations of add (ADD), subtract
(SUB), multiply (MUL), and divide (DIV) as well as arithmetic compare (CMP, CMPM,
CMP2), clear (CLR), and negate (NEG). The instruction set includes ADD, CMP, and
SUB instructions for both address and data operations with all operand sizes valid for
data operations. Address operands consist of 16 or 32 bits. The clear and negate in-
structions apply to all sizes of data operands.
Signed and unsigned MUL and DIV instructions include:
Word multiply to produce a long-word product
Long-word multiply to produce a long-word or quad-word product
Division of a long-word dividend by a word divisor (word quotient and word re-
mainder)
Division of a long-word or quad-word dividend by a long-word divisor (long-word
quotient and long-word remainder)
A set of extended instructions provides multiprecision and mixed-size arithmetic.
These instructions are add extended (ADDX), subtract extended (SUBX), sign extend
(EXT), and negate binary with extend (NEGX). Refer to
Table 4-3
for a summary of
the integer arithmetic operations.
MOVEM
list,
ea
ea
, list
Dn, (d
16
, An)
16, 32
16, 32
→
32
16, 32
Listed registers
→
Destination
Source
→
Listed registers
Dn [31: 24]
→
(An + d); Dn [23 : 16]
→
(An + d + 2);
Dn [15 : 8]
→
(An + d + 4)
+
Dn [7 : 0]
→
(An + d + 6)
MOVEP
(d
16
, An), Dn
(An + d)
→
Dn [31 : 24] : (An + d + 2)
→
Dn [23 : 16];
(An + d + 4)
→
Dn [15 : 8]
: (An + d + 6)
→
Dn [7 : 0]
Immediate data
→
Destination
SP – 4
→
SP
+
ea
→
SP
An
→
SP
+
(SP)
→
An, SP + 4
→
SP
MOVEQ
PEA
UNLK
#
data
,
Dn
ea
An
8
→
32
32
32
Table 4-3 Integer Arithmetic Operations
Instruction
Syntax
Dn,
ea
ea
, Dn
ea
, An
#
data
,
ea
#
data
,
ea
Dn, Dn
– (An), – (An)
ea
ea
, Dn
ea
, An
#
data
,
ea
(An) +, (An) +
Operand Size
8, 16, 32
8, 16, 32
16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
16, 32
8, 16, 32
8, 16, 32
Operation
ADD
Source + Destination
→
Destination
ADDA
ADDI
ADDQ
ADDX
Source + Destination
→
Destination
Immediate data + Destination
→
Destination
Immediate data + Destination
→
Destination
Source + Destination + X
→
Destination
CLR
CMP
CMPA
CMPI
CMPM
0
→
Destination
(Destination – Source), CCR shows results
(Destination – Source), CCR shows results
(Destination – Data), CCR shows results
(Destination – Source), CCR shows results
Table 4-2 Data Movement Operations
Instruction
Syntax
Operand Size
Operation
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.