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.

Compiler: Compiler and FMA switch

Other Parts Discussed in Thread: TMS570LC4357

Tool/software: TI C/C++ Compiler

Hi,
is there a compiler switch for turning on/off FMA instructions like vnmls.f64

  • Lars von Wachenfeldt said:
    is there a compiler switch for turning on/off FMA instructions like vnmls.f64

    Unfortunately, no.  For more general background on this topic, please see the wiki article Using NEON and VFPv3 on Cortex-A8.

    Thanks and regards,

    -George

  • Hi George,
    I forgot to add that we are using the TMS570LC4357 Cortex-R5 but that doesn't matter of course(?).

    In a project, we are testing a Safety Concept with two different compilers. Right now the second one is GCC but it cannot enable the FMA for ARM processors (for some other processors, it can: SPARC, X86 etc). That's why we want to turn it off (mainly at this point to compare the assembly output). In the long run we of course/most probably want the FMA instructions.

    Do you know some other compilers which utilize the FMA instructions? IAR? Keli? If you don't, we look it up ourselves. :)

    Kind regards,
    Lars
    Bombardier Transportation
    Rail Control Solutions
  • I am not an expert on the details of the ARM CPU family.  The term FMA instructions is new to me.  When I search, I can find FMA instructions associated with the Intel x86 CPU family, but not ARM.  And even if ARM supported FMA, or something similar, it probably would not be on one of the Cortex-R5 devices like the TMS570LC4357.  An advanced feature like that is more likely to appear on higher end devices like the Cortex-A8.

    Thanks and regards,

    -George

  • Hi again,
    the FMA/FMAC is new to me as well.

    You are completely right, I studied the ARM Tech Ref more thoroughly this time and the Cortex-R5 has Multiply-Add [MAC] instructions with two roundings but not Fused-Multiply-Add [FMAC] with a single rounding.

    For those who are interested:
    en.wikipedia.org/.../Multiply–accumulate_operation

    Many thanks for your time.

    Kind regards,
    Lars