Conditional Integer Subtract and Shift – Used for Division
SUBC
3-133
TMS320C62x/C67x Fixed-Point Instruction Set
Syntax
SUBC (.unit)
src1, src2, dst
.unit = .L1 or .L2
Opcode map field used...
For operand type...
Unit
src1
src2
dst
uint
xuint
uint
.L1, .L2
Opcode
31
29 28 27
23 22
18 17
creg
z
dst
13 12 11
5
4
3
2
1
0
x
1 0 0 1 0 1 1
1
1
0
s
p
3
5
5
5
7
src2
src1
Description
Subtract
src2 from src1. If result is greather than or equal to 0, left shift result
by 1, add 1 to it, and place it in
dst. If result is less than 0, left shift scr1 by 1,
and place it in
dst. This step is commonly used in division.
Execution
if (cond)
{
if (
src1 – src2
w
0)
( (
src1–src2)
<<
1) + 1
→
dst
else
src1
<<
1
→
dst
}
else
nop
Pipeline
Stage
E1
Read
src1, src2
Written
dst
Unit in use
.L
Instruction Type
Single-cycle
Delay Slots
0
Pipeline