Texas Instruments TMS320C67X/C67X+ DSP Car Speaker User Manual


 
ABS Absolute Value With Saturation
3-38 Instruction Set SPRU733
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
dst
xsint
sint
.L1, .L2 001 1010
src2
dst
slong
slong
.L1, L2 011 1000
Description The absolute value of src2 is placed in dst.
Execution 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
2
31
, then src2 dst
3) If src2 = 2
31
, then 2
31
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 2
39
, then src2 dst
3) If src2 = 2
39
, then 2
39
1 dst
Pipeline
Stage
E1
Read src2
Written dst
Unit in use
.L
Pipeline