The TI compiler for C64x / C64x + DSP on OMAP3 includes support for the fact that TI calls "internal" function calls. They are not really function calls, they are just a way of telling the compiler which assembly operation code to use for an operation that cannot be directly expressed in C. This is especially useful for using the SIMD operation codes in C64x / C64x + DSP from C.
An example could be:
A = _add2 (B, C);
This SIMD command adds the low / high 16 bits of B and C together and stores the results in the low / high 16 bits of A. You cannot express it in regular C, but you can do it with the built-in C.
I used the built-in C to get closer to what you could do with a full-blown assembly language (within 5-10%). This is especially useful for video functions such as filtering and motion compensation (_dotpsu4!).
I usually compile with the -al switch and look at the pipeline to try to determine which function blocks are overloaded, and then look at my internal properties to see if I can rebalance the loop (if I use too many S-blocks, I could see if I can change the opcode to use block M).
It is also useful to remember that the C64x DSP has 64 registers, so loading local variables and never assigning the output of the command back to the same variable - this will adversely affect the compiler's ability to pipeline correctly.
Overdrive
source share