MIPSr6/math: Use builtin fma and fmaf

MIPSr6 has MADDF.s/MADDF.d instructions, which are fused.

In MIPS ISA, double support can be subsetted.  Only FMAF is enabled
for this case.

	* sysdeps/mips/fpu/math-use-builtins-fma.h

Signed-off-by: YunQiang Su <syq@gcc.gnu.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
YunQiang Su 2024-06-04 09:31:19 +08:00 committed by Andreas K. Hüttel
parent 6f8c0dca8c
commit 9e06e4a43b
No known key found for this signature in database
GPG Key ID: DC2B16215ED5412A

View File

@ -0,0 +1,13 @@
#if __mips_isa_rev >= 6
# ifdef __mips_single_float
# define USE_FMA_BUILTIN 0
# else
# define USE_FMA_BUILTIN 1
# endif
# define USE_FMAF_BUILTIN 1
#else
# define USE_FMA_BUILTIN 0
# define USE_FMAF_BUILTIN 0
#endif
#define USE_FMAL_BUILTIN 0
#define USE_FMAF128_BUILTIN 0