Hello all,
I just discovered, that there are two interesting compiler provided defines FPC_HAS_FAST_FMA_SINGLE & FPC_HAS_FAST_FMA_SINGLE which seem to interact with the FASTMATH optimisation flag.
These might come in handy for something I am currently working on and I would like to fully understand their effects - but unfortunately there is litte to no information in the manuals for FPC 3.2.2.
My current understanding, after playing around and analysing the assembler output, is as follows
* the defines are set if a suitable target architecture is selected - e.g. for COREIAVX2 they are set, for COREI they are unset
* in the source I can enable / disable the use via {$optimisation FASTMATH} and {$optimisation NOFASTMATH}
Is the above correct, or is there something else I have to consider, if I want to compile a function with & without FMA operations?
Finally there is the command line parameter -Sv which is only explained as "use vector operations if available".
* is this really for generation of vector operations, or does it only relate to the vectorised parameter passing under Win?
* if the former, what magic must be applied in the source to make use of this? <= I did try some variants, but without any effect
Kind regards,
MathMan