Add2 – Texas Instruments TMS320C67X/C67X+ DSP User Manual

Page 125

Advertising
background image

Add Two 16-Bit Integers on Upper and Lower Register Halves

ADD2

3-65

Instruction Set

SPRU733

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

23

22

18

17

13

12

11

6 5 4 3 2 1 0

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

Advertising