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.

Forcing/Confirming FPU usage

Other Parts Discussed in Thread: TMS570LS20206

Hi,

Is there any way to either force the CCS compiler to use the FPU, or any easy way to confirm it is actually using it, for a given build of code?

CCS v5.5, TMS570LS20206.

cheers

Mat

  • Hi Mat,

    More than the options -mv7R and --float_support=VFPv3D16?

  • Thanks for the reply antony,

    Forgive my cynicism, but do these compiler options actually guarantee FPU usage or is it best effort?

    Might sound a strange question (and maybe my paranoia), but I did some work on Cortex-A8's a couple of years back and setting these options didn't work (I think the emulation libraries took precidence).

     

  • Hi Mat,

    Guarantee is a strong word.  Let me just say that I've not ever seen the compiler use floating point emulation code instead of emitting the VFP instructions with these options enabled. (For Cortex R4F).  Probably if we asked the code gen. team there might be some special case -- maybe some corner case -- where emulation might be used.  But I sure haven't seen it.  If you need that level of certainty we should post to the compiler forum, but if you just need a practical answer I'd say this option works as advertised.

    I can't speak to the A8 experience, but don't doubt you.   Just haven't seen this for R4F.

    There's also some options you should be aware of like --float_operations_allowed, --fp_mode, and -fp_reassoc.

    The latter two especially allow you to trade precision for runtime performance by bending some of the more strict rules that are on by default but probably don't make a difference for DSP code.