2.4.6. Intrinsics

The C28x compiler provides intrinsics, special functions that map directly to inlined C28x/FPU/FPU64/TMU instructions. Intrinsics are used to express operations that cannot be easily expressed in C/C++ code. Intrinsics are used like functions - C/C++ variables can be used with intrinsics. Intrinsics are specified with a leading double underscore.

An example is the __flip, __flip32 and __flip64 set of intrinsics to reverse the order of bits in the source. The compiler maps all 3 intrinsics to an appropriate sequence of C28x FLIP instructions.

int32_t x;
int32_t y;

...
x = __flip32(y);

For details on the set of intrinsics available in the C28x compiler and their description, refer to TMS320C28x Optimizing C/C++ Compiler User’s Guide, Section 7.6, Using Intrinsics to Access Assembly Language Statements.