This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6455: Is there a "MAX" instruction in C64+?

Part Number: TMS320C6455

Hi,

I'm trying optimization to my code on TMS320C6455, and I feel quite strange there is no assembly instruction of "MAX" to get larger number of two 32-bit intergers. Just provide "MAX2" for 16-bit short integers.

Am i right? And how to do MAX to 32-bit integers in an easy way?

thanks,

Weslly.

  • BTW, I'm using instrisic instructions inside my C code.
  • Hi,

    I've notified the sw team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Weslly,

    Use the C function for max() and look at the assembly generated to see how it was done. That will generally be the best way to do it in your hand assembly/intrinsic version.

    Other than that, the answer will be highly dependent on the exact algorithm you are trying to implement. A single stand-alone max(32,32) would take 2 cycles to compare and conditionally move. Multiple max(32,32) operations can be pipelined and can be combined into a much smaller set of execution packets. But I do not believe either the single or multiple can be accomplished with intrinsics explicitly. But if you write the code using the C function/macro and use the best optimization features, the compiler should generate good code for you.

    Regards,
    RandyP