[3/4] powerpc64le: refactor fmaf128
Commit Message
Use the compiler hint to determine if this can be inlined. This should
work for any supported GCC which inlines fma. Likewise, it prepares
for a more generic multiarch _Float128 implementation of libm.
---
.../powerpc64/le/fpu/multiarch/s_fmaf128-power9.c | 2 +-
.../powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c | 2 +-
.../powerpc64/le/{power9 => }/fpu/s_fmaf128.c | 13 ++++++++++---
3 files changed, 12 insertions(+), 5 deletions(-)
rename sysdeps/powerpc/powerpc64/le/{power9 => }/fpu/s_fmaf128.c (89%)
@@ -23,4 +23,4 @@
#define __fmaf128 __fmaf128_power9
-#include <sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c>
+#include <sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c>
@@ -23,4 +23,4 @@
#define __fmaf128 __fmaf128_ppc64
-#include <sysdeps/ieee754/float128/s_fmaf128.c>
+#include <sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c>
similarity index 89%
rename from sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c
rename to sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c
@@ -25,12 +25,19 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifdef __FP_FAST_FMAF128
+#include <float128_private.h>
#include <libm-alias-float128.h>
-__float128
-__fmaf128 (__float128 x, __float128 y, __float128 z)
+_Float128
+__fmaf128 (_Float128 x, _Float128 y, _Float128 z)
{
return x * y + z;
}
-
libm_alias_float128 (__fma, fma)
+
+#else
+
+#include <sysdeps/ieee754/float128/s_fmaf128.c>
+
+#endif