Tms320C6000 C/C++ Compiler Intrinsics - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Refining C/C++ Code
Table 3–6. TMS320C6000 C/C++ Compiler Intrinsics
C Compiler Intrinsic
int _abs(int src2 );
int_labs(long src2 );
int _abs2 (int src2);
int _add2(int src1 , int src2 );
int _add4 (int src1 , int src2 );
int _avg2 (int src1 , int src2 );
unsigned _avgu4(uint src1 , uint src2 );
unsigned _bitc4 (uint src2);
unsigned _bitr (uint src2);
uint _clr(uint src2, uint csta , uint cstb );
unsigned _clrr(uint src1 , int src2 );
int _cmpeq2 (int src1 , int src2 );
Note:
Instructions not specified with a device apply to all 'C6000 devices.
3-16
Table 3–6 lists the 'C6000 intrinsics. For more information on using intrinsics,
see the TMS320C6000 Optimizing C/C++ Compiler User's Guide .
Assembly
Instruction
ABS
ABS2
ADD2
ADD4
AVG2
AVGU4
BITC4
BITR
CLR
CLR
CMPEQ2
Description
Returns the saturated absolute value of
src2.
Calculates the absolute value for each
16–bit value.
Adds the upper and lower halves of src1 to
the upper and lower halves of src2 and re-
turns the result. Any overflow from the low-
er half add will not affect the upper half
add.
Performs 2s–complement addition to pairs
of packed 8–bit numbers.
Calculates the average for each pair of
signed 16–bit values.
Calculates the average for each pair of un-
signed 8–bit values.
For each of the 8–bit quantities in src, the
number of 1 bits is written to the corre-
sponding position in the return value.
Reverses the order of the bits.
Clears the specified field in src2. The be-
ginning and ending bits of the field to be
cleared are specified by csta and cstb, re-
spectively.
Clears the specified field in src2. The be-
ginning and ending bits of the field to be
cleared are specified by the lower 10 bits
of the source register.
Performs equality comparisons on each
pair of 16–bit values. Equality results are
packed into the two least–significant bits of
the return value.
Device
'C64x
'C64x
'C64x
'C64x
'C64x
'C64x
'C64x

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents