ABS Absolute Value With Saturation

 

 

 

 

Absolute Value With Saturation

 

 

 

 

 

 

 

 

 

ABS

 

 

 

 

 

 

 

 

 

 

 

 

Syntax

 

 

 

 

ABS (.unit) src2, dst

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.unit = .L1 or .L2

 

 

 

 

 

 

 

 

 

 

 

Compatibility

 

 

C62x, C64x, C67x, and C67x+ CPU

 

 

 

 

 

 

 

 

 

Opcode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

29

28

27

23

22

18

17

13

12

11

5

4

3

2

1

0

creg

z

dst

src2

0 0 0 0 0 x

op

1 1 0 s p

3

1

5

5

1

7

1

1

 

 

 

 

 

 

 

 

 

 

 

Opcode map field used...

For operand type...

Unit

Opfield

 

 

 

 

 

 

 

 

 

 

 

 

src2

xsint

.L1, .L2

001 1010

 

 

 

 

dst

sint

 

 

 

 

 

 

src2

slong

.L1, L2

011 1000

 

 

 

 

dst

slong

 

 

 

 

 

 

 

 

 

 

 

Description

Execution

Pipeline

The absolute value of src2 is placed in dst.

if (cond)

abs(src2) dst

else nop

 

The absolute value of src2 when src2 is an sint is determined as follows:

1)If src2 w 0, then src2 dst

2)If src2 t 0 and src2 ￿ −231, then −src2 dst

3)If src2 = −231, then 231 − 1 dst

The absolute value of src2 when src2 is an slong is determined as follows:

1)If src2 w 0, then src2 dst

2)If src2 t 0 and src2 ￿ −239, then −src2 dst

3)If src2 = −239, then 239 − 1 dst

Pipeline

StageE1

Read src2

Written dst

Unit in use

.L

 

 

3-38

Instruction Set

SPRU733

Page 98
Image 98
Texas Instruments TMS320C67X/C67X+ DSP Absolute Value With Saturation, Pipeline StageE1 Read src2 Written dst Unit in use