Texas Instruments TMS320C67X/C67X+ DSP Car Speaker User Manual


 
Add Two 16-Bit Integers on Upper and Lower Register Halves ADD2
3-65 Instruction SetSPRU733
Add Two 16-Bit Integers on Upper and Lower Register Halves
ADD2
Syntax ADD2 (.unit) src1, src2, dst
.unit = .S1 or .S2
Compatibility C62x, C64x, C67x, and C67x+ CPU
Opcode
31 29 27 2322 1817 131211 6543210
creg z dst src2 src1 x 0 0 0 0 0 1 1 0 0 0 s p
3 1 5 5 5 1 1 1
Opcode map field used... For operand type... Unit
src1
src2
dst
sint
xsint
sint
.S1, .S2
Description The upper and lower halves of the src1 operand are added to the upper and
lower halves of the src2 operand. The values in src1 and src2 are treated as
signed, packed 16-bit data and the results are written in signed, packed 16-bit
format into dst.
For each pair of signed packed 16-bit values found in the src1 and src2, the
sum between the 16-bit value from src1 and the 16-bit value from src2 is
calculated to produce a16-bit result. The result is placed in the corresponding
positions in the dst. The carry from the lower half add does not affect the upper
half add.
31 16 15 0
a_hi
a_lo
src1
ADD2
b_hi
b_lo
src2
31 16 15 0
a_hi + b_hi
a_lo + b_lo
dst