Integer Subtraction Using Addressing Mode
SUBAB/SUBAH/SUBAW
3-131
TMS320C62x/C67x Fixed-Point Instruction Set
Syntax
SUBAB (.unit)
src2, src1, dst
or
SUBAH (.unit)
src2, src1, dst
or
SUBAW (.unit)
src2, src1, dst
.unit = .D1 or .D2
Opcode map field used...
For operand type...
Unit
Opfield
src2
src1
dst
sint
sint
sint
.D1, .D2
Byte: 110001
Halfword: 110101
Word: 111001
src2
src1
dst
sint
ucst5
sint
.D1, .D2
Byte: 110011
Halfword: 110111
Word: 111011
Opcode
31
29 28 27
23 22
18 17
creg
z
dst
13 12
5
4
3
2
1
0
op
0
0
0
s
p
3
5
5
5
6
7
6
1
0
src2
src1/cst
Description
src1 is subtracted from src2. The subtraction defaults to linear mode. Howev-
er, if
src2 is one of A4–A7 or B4–B7, the mode can be changed to circular mode
by writing the appropriate value to the AMR (see section 2.6.1 on page 2-9).
src1 is left shifted by 1 or 2 for halfword and word data sizes, respectively.
SUBAB, SUBAH, and SUBAW are byte, halfword, and word mnemonics, re-
spectively. The result is placed in
dst.
Execution
if (cond)
src2 –a src1
→
dst
else
nop
Pipeline
Stage
E1
Read
src1, src2
Written
dst
Unit in use
.D
Instruction Type
Single-cycle
Delay Slots
0
Pipeline