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.

C28x floating point comparision



Hello to verybody.

I'm using Concerto C28x.

I write this code:

float a,b;

a = (a<b)?(a):(b)

The code select the min between a and b and put the result in a

I expected the compiler use MAXF32 or MINF32 instruction,

but the compiler use COMPF32.

Is there a way the use MIN,MAX instruction or to tell the compiler to use this ?

Thankyou in advice ...

  • Hi!

    Ok, the compiler does not recognize this optimization. No problem. If you want you can optimize by hand and use an intrinsic function (e.g. __f32_max_idx. see "TMS320C28x Optimizing C/C++ Compiler User's Guide").

    Best regards,
    Edwin Krasser