2024-04-12 01:26 AM
Hi,
I tried to write a piece of code involving multiplication and addition (a*b+c) hoping the compiler would automatically use the FMA (fused multiply-add) instruction. However, it seems to still decompose it into separate instructions, efsadd and efsmul. I've attempted to use compiler options like -O3 or -ffpcontract=fast, but I haven't seen it compile into FMA instructions. I'd like to ask if FMA instructions are supported? (I've seen instructions like fmadd mentioned in the documentation).
Best regards,
Solved! Go to Solution.
2024-04-13 03:38 AM
Hello,
the FMA instruction is included in PowerPC instruction set (see the Reference Manual for Book-E processors).
However is the compiler responsible for generating FMADD instruction.
Which compiler did you use for testing?
The Hightec PowerPC compiler (available here) by default generates float-multiple-add instructions.
If you use SPC5Studio, install the Hightec PowerPC compiler suite via SPC5Studio market place, then apply for license.
Best Regards.
2024-04-13 03:38 AM
Hello,
the FMA instruction is included in PowerPC instruction set (see the Reference Manual for Book-E processors).
However is the compiler responsible for generating FMADD instruction.
Which compiler did you use for testing?
The Hightec PowerPC compiler (available here) by default generates float-multiple-add instructions.
If you use SPC5Studio, install the Hightec PowerPC compiler suite via SPC5Studio market place, then apply for license.
Best Regards.
2024-04-15 08:15 PM
I'm using the FreeFCC compiler with VLE support as the default option. I'll try switching to Hightect and see how it goes. Thank you very much for your help.
Best regards,