50
Type
Instruction
Size
*
1
Function
Arithmetic
operations
DIVXS
B/W
Rd ÷ Rs
→
Rd
Performs signed 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 CCR
bits according to the result.
NEG
B/W/L
0 – Rd
→
Rd
Takes the two's complement (arithmetic complement) of
data in a general register.
EXTU
W/L
Rd (zero extension)
→
Rd
Extends the lower 8 bits of a 16-bit register to word size,
or the lower 16 bits of a 32-bit register to longword size,
by padding with zeros on the left.
EXTS
W/L
Rd (sign extension)
→
Rd
Extends the lower 8 bits of a 16-bit register to word size,
or the lower 16 bits of a 32-bit register to longword size,
by extending the sign bit.
TAS
B
@ERd – 0, 1
→
(<bit 7> of @ERd)
*
2
Tests memory contents, and sets the most significant bit
(bit 7) to 1.
MAC
—
(EAs)
×
(EAd) + MAC
→
MAC
Performs signed multiplication on memory contents and
adds the result to the multiply-accumulate register. The
following operations can be performed:
16 bits
×
16 bits + 32 bits
→
32 bits, saturating
16 bits
×
16 bits + 42 bits
→
42 bits, non-saturating
CLRMAC
—
0
→
MAC
Clears the multiply-accumulate register to zero.
LDMAC
STMAC
L
Rs
→
MAC, MAC
→
Rd
Transfers data between a general register and a
multiply-accumulate register.
Summary of Contents for H8S/2645
Page 4: ......
Page 16: ......
Page 58: ...26 ...
Page 110: ...78 ...
Page 120: ...88 ...
Page 132: ...100 ...
Page 160: ...128 ...
Page 172: ...140 ...
Page 418: ...386 ...
Page 444: ...412 ...
Page 530: ...498 ...
Page 562: ...530 ...
Page 642: ...610 ...
Page 662: ...630 ...
Page 688: ...656 ...
Page 756: ...724 ...
Page 784: ...752 ...
Page 812: ...780 ...
Page 837: ...805 A 2 Instruction Codes Table A 2 shows the instruction codes ...
Page 1152: ...1120 ...