
Table 1-3 Instructions Classified by Function (cont)
Type
Instruction
Size
*
Function
DIVXU
B/W
Rd ÷ Rs
→
Rd
Performs unsigned division on data in two general
registers: either 16 bits ÷ 8 bits
→
8-bit quotient and 8-
bit remainder or 32 bits ÷ 16 bits
→
16-bit quotient and
16-bit remainder.
CMP
B/W/L
Rd – Rs, Rd – #IMM
Compares data in a general register with data in
another general register or with immediate data, and
sets the CCR according to the result.
NEG
B/W/L
0 – Rd
→
Rd
Takes the two’s complement (arithmetic complement) of
data in a general register.
EXTS
W/L
Rd (sign extension)
→
Rd
Extends byte data in the lower 8 bits of a 16-bit register
to word data, or extends word data in the lower 16 bits
of a 32-bit register to longword data, by extending the
sign bit.
EXTU
W/L
Rd (zero extension)
→
Rd
Extends byte data in the lower 8 bits of a 16-bit register
to word data, or extends word data in the lower 16 bits
of a 32-bit register to longword data, by padding with
zeros.
Logic operations
AND
B/W/L
Rd
∧
Rs
→
Rd, Rd
∧
#IMM
→
Rd
Performs a logical AND operation on a general register
and another general register or immediate data.
OR
B/W/L
Rd
∨
Rs
→
Rd, Rd
∨
#IMM
→
Rd
Performs a logical OR operation on a general register
and another general register or immediate data.
XOR
B/W/L
Rd
⊕
Rs
→
Rd, Rd
⊕
#IMM
→
Rd
Performs a logical exclusive OR operation on a general
register and another general register or immediate
data.
NOT
B/W/L
¬ (Rd)
→
(Rd)
Takes the one’s complement of general register
contents.
Note:
*
Size refers to the operand size.
B: Byte
W: Word
L: Longword
Arithmetic
operations
21