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

 

ADD2

 

 

 

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 155511 1

Opcode map field used...

For operand type...

Unit

 

 

 

src1

sint

.S1, .S2

src2

xsint

 

dst

sint

 

 

 

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

16

15

0

 

 

 

 

 

 

 

a_hi + b_hi

 

a_lo + b_lo

 

 

 

 

 

 

 

 

 

 

 

src2

dst

SPRU733

Instruction Set

3-65

Page 125
Image 125
Texas Instruments TMS320C67X/C67X+ DSP manual Add Two 16-Bit Integers on Upper and Lower Register Halves, ADD2