
MOTOROLA
4-8
INSTRUCTION SET
CPU32
REFERENCE MANUAL
4.3.4 Logic Instructions
The logical operation instructions (AND, OR, EOR, and NOT) perform logical opera-
tions with all sizes of integer data operands. A similar set of immediate instructions
(ANDI, ORI, and EORI) provide these logical operations with all sizes of immediate da-
ta. The TST instruction arithmetically compares the operand with zero, placing the re-
sult in the condition code register.
Table 4-4
summarizes the logical operations.
CMP2
DIVS/DIVU
ea
, Rn
ea
, Dn
8, 16, 32
32/16
→
16 : 16 Destination / Source
→
Destination
(signed or unsigned)
64/32
→
32 : 32
32/32
→
32
32/32
→
32 : 32
8
→
16
16
→
32
8
→
32
Sign extended Destination
→
Destination
16
16
→
32
32
32
→
32
32
32
→
64
8, 16, 32
0 – Destination
→
Destination
8, 16, 32
0 – Destination – X
→
Destination
8, 16, 32
Destination – Source
→
Destination
16, 32
Destination – Source
→
Destination
8, 16, 32
Destination – Data
→
Destination
8, 16, 32
Destination – Data
Destination
8, 16, 32
8, 16, 32
8, 16, 32
Dyn – Dym
→
Temp
(Temp
Dn [7 : 0])
→
Temp
(Dym
256)
+ Temp
→
Dn
8, 16, 32
Dyn – Dym
→
Temp
(Temp
Dn [7 : 0]) / 256
→
Temp
Dym + Temp
→
Dn
Lower bound Rn Upper bound, CCR shows result
DIVSL/DIVUL
ea
, Dr : Dq
ea
, Dq
ea
, Dr : Dq
Dn Dn
Destination / Source
→
Destination
(signed or unsigned)
EXT
Sign extended Destination
→
Destination
EXTB
MULS/MULU
Dn
ea
, Dn
ea
, Dl
ea
, Dh : Dl
Source
Destination
→
Destination
(signed or unsigned)
NEG
NEGX
SUB
SUBA
SUBI
SUBQ
SUBX
ea
ea
ea
, Dn Dn,
ea
ea
, An
#
data
,
ea
#
data
,
ea
Dn, Dn
– (An), – (An)
ea
, Dn
Dym : Dyn, Dn
Destination – Source – X
→
Destination
TBLS/TBLU
TBLSN/TBLUN
ea
, Dn
Dym : Dyn, Dn
Table 4-4 Logic Operations
Instruction
Syntax
ea
, Dn
Dn,
ea
#
data
,
ea
Dn,
ea
#
data
,
ea
ea
ea
, Dn
Dn,
ea
#
data
,
ea
ea
Operand Size
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
Operation
AND
Source
Destination
→
Destination
ANDI
EOR
EORI
NOT
Data
Destination
→
Destination
Source
⊕
Destination
→
Destination
Data
⊕
Destination
→
Destination
Destination
→
Destination
OR
Source
+
Destination
→
Destination
ORI
TST
Data
+
Destination
→
Destination
Source – 0, to set condition codes
Table 4-3 Integer Arithmetic Operations
Instruction
Syntax
Operand Size
Operation
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.