Files
semi-libc/include
Szabolcs NagyandRich Felker e980ca7a57 define FP_FAST_FMA* when fma* can be inlined
FP_FAST_FMA can be defined if "the fma function generally executes about
as fast as, or faster than, a multiply and an add of double operands",
which can only be true if the fma call is inlined as an instruction.

gcc sets __FP_FAST_FMA if __builtin_fma is inlined as an instruction,
but that does not mean an fma call will be inlined (e.g. it is defined
with -fno-builtin-fma), other compilers (clang) don't even have such
macro, but this is the closest we can get.

(even if the libc fma implementation is a single instruction, the extern
call overhead is already too big when the macro is used to decide between
x*y+z and fma(x,y,z) so it cannot be based on libc only, defining the
macro unconditionally on targets which have fma in the base isa is also
incorrect: the compiler might not inline fma anyway.)

this solution works with gcc unless fma inlining is explicitly turned off.
2019-04-17 13:02:47 -04:00
..
2013-07-03 18:07:50 +02:00
2012-05-06 16:35:32 -04:00
2016-08-30 16:39:54 -04:00
2011-02-12 00:22:29 -05:00
2012-09-08 18:16:33 -04:00
2019-04-10 20:37:04 -04:00
2011-02-12 00:22:29 -05:00
2014-06-21 19:24:15 -04:00
2011-02-14 21:59:38 -05:00
2012-05-06 16:35:32 -04:00
2011-02-12 00:22:29 -05:00
2011-02-12 00:22:29 -05:00
2018-06-26 16:59:12 -04:00
2014-07-31 02:38:23 -04:00
2011-04-05 15:40:36 -04:00
2019-03-13 10:42:57 -04:00
2011-02-12 00:22:29 -05:00
2018-03-10 18:19:40 -05:00
2016-10-20 16:55:32 -04:00
2013-01-04 20:36:34 +01:00