about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2021-09-22 21:25:31 +0000
committerJoseph Myers <joseph@codesourcery.com>2021-09-22 21:25:31 +0000
commitb3f27d8150d4f3c64063a9a257ec1d228de66398 (patch)
tree23ea73de01b3e4f37fdc9152d6ffa90f4ba917e6 /sysdeps
parentb413280cfb16834450f66f554bc0d618bb513851 (diff)
downloadglibc-b3f27d8150d4f3c64063a9a257ec1d228de66398.tar.gz
glibc-b3f27d8150d4f3c64063a9a257ec1d228de66398.tar.xz
glibc-b3f27d8150d4f3c64063a9a257ec1d228de66398.zip
Add narrowing fma functions
This patch adds the narrowing fused multiply-add functions from TS
18661-1 / TS 18661-3 / C2X to glibc's libm: ffma, ffmal, dfmal,
f32fmaf64, f32fmaf32x, f32xfmaf64 for all configurations; f32fmaf64x,
f32fmaf128, f64fmaf64x, f64fmaf128, f32xfmaf64x, f32xfmaf128,
f64xfmaf128 for configurations with _Float64x and _Float128;
__f32fmaieee128 and __f64fmaieee128 aliases in the powerpc64le case
(for calls to ffmal and dfmal when long double is IEEE binary128).
Corresponding tgmath.h macro support is also added.

The changes are mostly similar to those for the other narrowing
functions previously added, especially that for sqrt, so the
description of those generally applies to this patch as well.  As with
sqrt, I reused the same test inputs in auto-libm-test-in as for
non-narrowing fma rather than adding extra or separate inputs for
narrowing fma.  The tests in libm-test-narrow-fma.inc also follow
those for non-narrowing fma.

The non-narrowing fma has a known bug (bug 6801) that it does not set
errno on errors (overflow, underflow, Inf * 0, Inf - Inf).  Rather
than fixing this or having narrowing fma check for errors when
non-narrowing does not (complicating the cases when narrowing fma can
otherwise be an alias for a non-narrowing function), this patch does
not attempt to check for errors from narrowing fma and set errno; the
CHECK_NARROW_FMA macro is still present, but as a placeholder that
does nothing, and this missing errno setting is considered to be
covered by the existing bug rather than needing a separate open bug.
missing-errno annotations are duly added to many of the
auto-libm-test-in test inputs for fma.

This completes adding all the new functions from TS 18661-1 to glibc,
so will be followed by corresponding stdc-predef.h changes to define
__STDC_IEC_60559_BFP__ and __STDC_IEC_60559_COMPLEX__, as the support
for TS 18661-1 will be at a similar level to that for C standard
floating-point facilities up to C11 (pragmas not implemented, but
library functions done).  (There are still further changes to be done
to implement changes to the types of fromfp functions from N2548.)

Tested as followed: natively with the full glibc testsuite for x86_64
(GCC 11, 7, 6) and x86 (GCC 11); with build-many-glibcs.py with GCC
11, 7 and 6; cross testing of math/ tests for powerpc64le, powerpc32
hard float, mips64 (all three ABIs, both hard and soft float).  The
different GCC versions are to cover the different cases in tgmath.h
and tgmath.h tests properly (GCC 6 has _Float* only as typedefs in
glibc headers, GCC 7 has proper _Float* support, GCC 8 adds
__builtin_tgmath).
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/i686/multiarch/s_fma.c6
-rw-r--r--sysdeps/ia64/fpu/s_fma.S1
-rw-r--r--sysdeps/ia64/fpu/s_fmal.S1
-rw-r--r--sysdeps/ieee754/dbl-64/s_f32xfmaf64.c1
-rw-r--r--sysdeps/ieee754/dbl-64/s_ffma.c35
-rw-r--r--sysdeps/ieee754/dbl-64/s_fma.c6
-rw-r--r--sysdeps/ieee754/float128/float128_private.h2
-rw-r--r--sysdeps/ieee754/float128/s_f32fmaf128.c6
-rw-r--r--sysdeps/ieee754/float128/s_f64fmaf128.c10
-rw-r--r--sysdeps/ieee754/float128/s_f64xfmaf128.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/s_dfmal.c38
-rw-r--r--sysdeps/ieee754/ldbl-128/s_f64xfmaf128.c39
-rw-r--r--sysdeps/ieee754/ldbl-128/s_ffmal.c34
-rw-r--r--sysdeps/ieee754/ldbl-128/s_fma.c6
-rw-r--r--sysdeps/ieee754/ldbl-128/s_fmal.c4
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/Versions2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_dfmal.c28
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_ffmal.c28
-rw-r--r--sysdeps/ieee754/ldbl-96/s_dfmal.c34
-rw-r--r--sysdeps/ieee754/ldbl-96/s_ffmal.c32
-rw-r--r--sysdeps/ieee754/ldbl-96/s_fma.c6
-rw-r--r--sysdeps/ieee754/ldbl-opt/Makefile4
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-dfma.c28
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-ffma.c28
-rw-r--r--sysdeps/ieee754/soft-fp/s_dfmal.c74
-rw-r--r--sysdeps/ieee754/soft-fp/s_ffma.c72
-rw-r--r--sysdeps/ieee754/soft-fp/s_ffmal.c70
-rw-r--r--sysdeps/ieee754/soft-fp/s_fma.c6
-rw-r--r--sysdeps/ieee754/soft-fp/s_fmal.c4
-rw-r--r--sysdeps/mach/hurd/i386/libm.abilist13
-rw-r--r--sysdeps/powerpc/fpu/libm-test-ulps16
-rw-r--r--sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-macros.h3
-rw-r--r--sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc.h5
-rw-r--r--sysdeps/riscv/rvd/s_fma.c6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c6
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c6
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/alpha/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/arc/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/arm/be/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/arm/le/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/csky/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/hppa/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/i386/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/ia64/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/be/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/le/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/nios2/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/sh/be/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/sh/le/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/libm.abilist13
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist13
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fma.c6
67 files changed, 947 insertions, 1 deletions
diff --git a/sysdeps/i386/i686/multiarch/s_fma.c b/sysdeps/i386/i686/multiarch/s_fma.c
index 229f6c6526..c003317bf7 100644
--- a/sysdeps/i386/i686/multiarch/s_fma.c
+++ b/sysdeps/i386/i686/multiarch/s_fma.c
@@ -19,9 +19,14 @@
 #define NO_MATH_REDIRECT
 #include <config.h>
 
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <init-arch.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 extern double __fma_ia32 (double x, double y, double z) attribute_hidden;
 extern double __fma_fma (double x, double y, double z) attribute_hidden;
@@ -29,6 +34,7 @@ extern double __fma_fma (double x, double y, double z) attribute_hidden;
 libm_ifunc (__fma,
 	    CPU_FEATURE_USABLE (FMA) ? __fma_fma : __fma_ia32);
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
 
 #define __fma __fma_ia32
 
diff --git a/sysdeps/ia64/fpu/s_fma.S b/sysdeps/ia64/fpu/s_fma.S
index c6346553bd..511cec4e9b 100644
--- a/sysdeps/ia64/fpu/s_fma.S
+++ b/sysdeps/ia64/fpu/s_fma.S
@@ -69,3 +69,4 @@ GLOBAL_LIBM_ENTRY(fma)
 
 GLOBAL_LIBM_END(fma)
 libm_alias_double_other (fma, fma)
+libm_alias_double_narrow (fma, fma)
diff --git a/sysdeps/ia64/fpu/s_fmal.S b/sysdeps/ia64/fpu/s_fmal.S
index 60881124b1..21eb24f704 100644
--- a/sysdeps/ia64/fpu/s_fmal.S
+++ b/sysdeps/ia64/fpu/s_fmal.S
@@ -69,3 +69,4 @@ GLOBAL_LIBM_ENTRY(fmal)
 
 GLOBAL_LIBM_END(fmal)
 libm_alias_ldouble_other (fma, fma)
+libm_alias_ldouble_narrow (fma, fma)
diff --git a/sysdeps/ieee754/dbl-64/s_f32xfmaf64.c b/sysdeps/ieee754/dbl-64/s_f32xfmaf64.c
new file mode 100644
index 0000000000..8ee50d9f4a
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/s_f32xfmaf64.c
@@ -0,0 +1 @@
+/* Defined as an alias of fma.  */
diff --git a/sysdeps/ieee754/dbl-64/s_ffma.c b/sysdeps/ieee754/dbl-64/s_ffma.c
new file mode 100644
index 0000000000..6af70d6368
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/s_ffma.c
@@ -0,0 +1,35 @@
+/* Fused multiply-add of double value, narrowing the result to float.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32fmaf64 __hide_f32fmaf64
+#define f32fmaf32x __hide_f32fmaf32x
+#define ffmal __hide_ffmal
+#include <math.h>
+#undef f32fmaf64
+#undef f32fmaf32x
+#undef ffmal
+
+#include <math-narrow.h>
+
+float
+__ffma (double x, double y, double z)
+{
+  NARROW_FMA_ROUND_TO_ODD (x, y, z, float, union ieee754_double, , mantissa1,
+			   false);
+}
+libm_alias_float_double (fma)
diff --git a/sysdeps/ieee754/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c
index aa4336387a..87e59033e4 100644
--- a/sysdeps/ieee754/dbl-64/s_fma.c
+++ b/sysdeps/ieee754/dbl-64/s_fma.c
@@ -18,12 +18,17 @@
 
 #define NO_MATH_REDIRECT
 #include <float.h>
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <fenv.h>
 #include <ieee754.h>
 #include <math-barriers.h>
 #include <fenv_private.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 #include <tininess.h>
 #include <math-use-builtins.h>
 
@@ -301,4 +306,5 @@ __fma (double x, double y, double z)
 }
 #ifndef __fma
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
 #endif
diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h
index 13d1d63baf..a3c8d4c63a 100644
--- a/sysdeps/ieee754/float128/float128_private.h
+++ b/sysdeps/ieee754/float128/float128_private.h
@@ -285,6 +285,8 @@
 #define __daddl __f64addf128
 #define __fdivl __f32divf128
 #define __ddivl __f64divf128
+#define __ffmal __f32fmaf128
+#define __dfmal __f64fmaf128
 #define __fmull __f32mulf128
 #define __dmull __f64mulf128
 #define __fsqrtl __f32sqrtf128
diff --git a/sysdeps/ieee754/float128/s_f32fmaf128.c b/sysdeps/ieee754/float128/s_f32fmaf128.c
new file mode 100644
index 0000000000..459903db92
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_f32fmaf128.c
@@ -0,0 +1,6 @@
+#define f32fmaf64x __hide_f32fmaf64x
+#define f32fmaf128 __hide_f32fmaf128
+#include <float128_private.h>
+#undef f32fmaf64x
+#undef f32fmaf128
+#include "../ldbl-128/s_ffmal.c"
diff --git a/sysdeps/ieee754/float128/s_f64fmaf128.c b/sysdeps/ieee754/float128/s_f64fmaf128.c
new file mode 100644
index 0000000000..38caab5d7d
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_f64fmaf128.c
@@ -0,0 +1,10 @@
+#define f32xfmaf64x __hide_f32xfmaf64x
+#define f32xfmaf128 __hide_f32xfmaf128
+#define f64fmaf64x __hide_f64fmaf64x
+#define f64fmaf128 __hide_f64fmaf128
+#include <float128_private.h>
+#undef f32xfmaf64x
+#undef f32xfmaf128
+#undef f64fmaf64x
+#undef f64fmaf128
+#include "../ldbl-128/s_dfmal.c"
diff --git a/sysdeps/ieee754/float128/s_f64xfmaf128.c b/sysdeps/ieee754/float128/s_f64xfmaf128.c
new file mode 100644
index 0000000000..9eaec08fdd
--- /dev/null
+++ b/sysdeps/ieee754/float128/s_f64xfmaf128.c
@@ -0,0 +1,2 @@
+#include <float128_private.h>
+#include "../ldbl-128/s_f64xfmaf128.c"
diff --git a/sysdeps/ieee754/ldbl-128/s_dfmal.c b/sysdeps/ieee754/ldbl-128/s_dfmal.c
new file mode 100644
index 0000000000..e00ddba22c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_dfmal.c
@@ -0,0 +1,38 @@
+/* Fused multiply-add of long double (ldbl-128) value, narrowing the result
+   to double.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32xfmaf64x __hide_f32xfmaf64x
+#define f32xfmaf128 __hide_f32xfmaf128
+#define f64fmaf64x __hide_f64fmaf64x
+#define f64fmaf128 __hide_f64fmaf128
+#include <math.h>
+#undef f32xfmaf64x
+#undef f32xfmaf128
+#undef f64fmaf64x
+#undef f64fmaf128
+
+#include <math-narrow.h>
+
+double
+__dfmal (_Float128 x, _Float128 y, _Float128 z)
+{
+  NARROW_FMA_ROUND_TO_ODD (x, y, z, double, union ieee854_long_double, l,
+			   mantissa3, false);
+}
+libm_alias_double_ldouble (fma)
diff --git a/sysdeps/ieee754/ldbl-128/s_f64xfmaf128.c b/sysdeps/ieee754/ldbl-128/s_f64xfmaf128.c
new file mode 100644
index 0000000000..8616451d39
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_f64xfmaf128.c
@@ -0,0 +1,39 @@
+/* Fused multiply-add of _Float128 value, converting the result to _Float64x.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math-narrow.h>
+#include <tininess.h>
+
+/* math_ldbl.h defines _Float128 to long double for this directory,
+   but when they are different, this function must be defined with
+   _Float128 arguments to avoid defining an alias with an incompatible
+   type.  */
+#undef _Float128
+
+#if __HAVE_FLOAT64X_LONG_DOUBLE && __HAVE_DISTINCT_FLOAT128
+_Float64x
+__f64xfmaf128 (_Float128 x, _Float128 y, _Float128 z)
+{
+  NARROW_FMA_ROUND_TO_ODD (x, y, z, _Float64x, union ieee854_long_double, l,
+			   mantissa3, TININESS_AFTER_ROUNDING);
+}
+libm_alias_float64x_float128 (fma)
+#else
+/* Defined as an alias of fmal.  */
+#endif
diff --git a/sysdeps/ieee754/ldbl-128/s_ffmal.c b/sysdeps/ieee754/ldbl-128/s_ffmal.c
new file mode 100644
index 0000000000..65d5e4830a
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_ffmal.c
@@ -0,0 +1,34 @@
+/* Fused multiply-add of long double (ldbl-128) value, narrowing the result
+   to float.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32fmaf64x __hide_f32fmaf64x
+#define f32fmaf128 __hide_f32fmaf128
+#include <math.h>
+#undef f32fmaf64x
+#undef f32fmaf128
+
+#include <math-narrow.h>
+
+float
+__ffmal (_Float128 x, _Float128 y, _Float128 z)
+{
+  NARROW_FMA_ROUND_TO_ODD (x, y, z, float, union ieee854_long_double, l,
+			   mantissa3, false);
+}
+libm_alias_float_ldouble (fma)
diff --git a/sysdeps/ieee754/ldbl-128/s_fma.c b/sysdeps/ieee754/ldbl-128/s_fma.c
index 4795e717e8..bc90c8813f 100644
--- a/sysdeps/ieee754/ldbl-128/s_fma.c
+++ b/sysdeps/ieee754/ldbl-128/s_fma.c
@@ -17,10 +17,15 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define NO_MATH_REDIRECT
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <fenv.h>
 #include <ieee754.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 #include <math-use-builtins.h>
 
 /* This implementation relies on long double being more than twice as
@@ -58,4 +63,5 @@ __fma (double x, double y, double z)
 }
 #ifndef __fma
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
 #endif
diff --git a/sysdeps/ieee754/ldbl-128/s_fmal.c b/sysdeps/ieee754/ldbl-128/s_fmal.c
index aff9efca8c..4595ad2bc5 100644
--- a/sysdeps/ieee754/ldbl-128/s_fmal.c
+++ b/sysdeps/ieee754/ldbl-128/s_fmal.c
@@ -18,12 +18,15 @@
 
 #define NO_MATH_REDIRECT
 #include <float.h>
+#define f64xfmaf128 __hide_f64xfmaf128
 #include <math.h>
+#undef f64xfmaf128
 #include <fenv.h>
 #include <ieee754.h>
 #include <math-barriers.h>
 #include <math_private.h>
 #include <libm-alias-ldouble.h>
+#include <math-narrow-alias.h>
 #include <tininess.h>
 #include <math-use-builtins.h>
 
@@ -303,3 +306,4 @@ __fmal (_Float128 x, _Float128 y, _Float128 z)
 #endif /* ! USE_FMAL_BUILTIN  */
 }
 libm_alias_ldouble (__fma, fma)
+libm_alias_ldouble_narrow (__fma, fma)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Versions b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
index 885ffb977f..03a66134c4 100644
--- a/sysdeps/ieee754/ldbl-128ibm-compat/Versions
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
@@ -124,6 +124,8 @@ libm {
     __ynieee128;
   }
   GLIBC_2.35 {
+    __f32fmaieee128;
+    __f64fmaieee128;
     __f32sqrtieee128;
     __f64sqrtieee128;
   }
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_dfmal.c b/sysdeps/ieee754/ldbl-128ibm/s_dfmal.c
new file mode 100644
index 0000000000..644fe413d1
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm/s_dfmal.c
@@ -0,0 +1,28 @@
+/* Fused multiply-add of long double (ldbl-128ibm) value, narrowing the result
+   to double.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math-narrow.h>
+
+double
+__dfmal (long double x, long double y, long double z)
+{
+  NARROW_FMA_TRIVIAL (x, y, z, double, l);
+}
+libm_alias_double_ldouble (fma)
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_ffmal.c b/sysdeps/ieee754/ldbl-128ibm/s_ffmal.c
new file mode 100644
index 0000000000..e71c40c80a
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm/s_ffmal.c
@@ -0,0 +1,28 @@
+/* Fused multiply-add of long double (ldbl-128ibm) value, narrowing the result
+   to float.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math-narrow.h>
+
+float
+__ffmal (long double x, long double y, long double z)
+{
+  NARROW_FMA_TRIVIAL (x, y, z, float, l);
+}
+libm_alias_float_ldouble (fma)
diff --git a/sysdeps/ieee754/ldbl-96/s_dfmal.c b/sysdeps/ieee754/ldbl-96/s_dfmal.c
new file mode 100644
index 0000000000..5a1ecf7e79
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/s_dfmal.c
@@ -0,0 +1,34 @@
+/* Fused multiply-add of long double (ldbl-96) value, narrowing the result
+   to double.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32xfmaf64x __hide_f32xfmaf64x
+#define f64fmaf64x __hide_f64fmaf64x
+#include <math.h>
+#undef f32xfmaf64x
+#undef f64fmaf64x
+
+#include <math-narrow.h>
+
+double
+__dfmal (long double x, long double y, long double z)
+{
+  NARROW_FMA_ROUND_TO_ODD (x, y, z, double, union ieee854_long_double, l,
+			   mantissa1, false);
+}
+libm_alias_double_ldouble (fma)
diff --git a/sysdeps/ieee754/ldbl-96/s_ffmal.c b/sysdeps/ieee754/ldbl-96/s_ffmal.c
new file mode 100644
index 0000000000..71f96b880b
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/s_ffmal.c
@@ -0,0 +1,32 @@
+/* Fused multiply-add of long double (ldbl-96) value, narrowing the result
+   to float.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32fmaf64x __hide_f32fmaf64x
+#include <math.h>
+#undef f32fmaf64x
+
+#include <math-narrow.h>
+
+float
+__ffmal (long double x, long double y, long double z)
+{
+  NARROW_FMA_ROUND_TO_ODD (x, y, z, float, union ieee854_long_double, l,
+			   mantissa1, false);
+}
+libm_alias_float_ldouble (fma)
diff --git a/sysdeps/ieee754/ldbl-96/s_fma.c b/sysdeps/ieee754/ldbl-96/s_fma.c
index 417c27e534..025c60651e 100644
--- a/sysdeps/ieee754/ldbl-96/s_fma.c
+++ b/sysdeps/ieee754/ldbl-96/s_fma.c
@@ -18,11 +18,16 @@
 
 #define NO_MATH_REDIRECT
 #include <float.h>
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <fenv.h>
 #include <ieee754.h>
 #include <math-barriers.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 /* This implementation uses rounding to odd to avoid problems with
    double rounding.  See a paper by Boldo and Melquiond:
@@ -97,4 +102,5 @@ __fma (double x, double y, double z)
 }
 #ifndef __fma
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
 #endif
diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile
index dff53cc0d8..6b21680033 100644
--- a/sysdeps/ieee754/ldbl-opt/Makefile
+++ b/sysdeps/ieee754/ldbl-opt/Makefile
@@ -45,7 +45,7 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
 		 nextup nextdown totalorder totalordermag getpayload \
 		 canonicalize setpayload setpayloadsig llogb fmaxmag fminmag \
 		 roundeven fromfp ufromfp fromfpx ufromfpx fadd dadd \
-		 fdiv ddiv fmul dmul fsqrt dsqrt fsub dsub
+		 fdiv ddiv ffma dfma fmul dmul fsqrt dsqrt fsub dsub
 libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
 libnldbl-inhibit-o = $(object-suffixes)
 libnldbl-static-only-routines = $(libnldbl-routines)
@@ -89,6 +89,7 @@ CFLAGS-nldbl-ctan.c = -fno-builtin-ctanl
 CFLAGS-nldbl-ctanh.c = -fno-builtin-ctanhl
 CFLAGS-nldbl-dadd.c = -fno-builtin-daddl
 CFLAGS-nldbl-ddiv.c = -fno-builtin-ddivl
+CFLAGS-nldbl-dfma.c = -fno-builtin-dfmal
 CFLAGS-nldbl-dmul.c = -fno-builtin-dmull
 CFLAGS-nldbl-dsqrt.c = -fno-builtin-dsqrtl
 CFLAGS-nldbl-dsub.c = -fno-builtin-dsubl
@@ -102,6 +103,7 @@ CFLAGS-nldbl-fabs.c = -fno-builtin-fabsl
 CFLAGS-nldbl-fadd.c = -fno-builtin-faddl
 CFLAGS-nldbl-fdim.c = -fno-builtin-fdiml
 CFLAGS-nldbl-fdiv.c = -fno-builtin-fdivl
+CFLAGS-nldbl-ffma.c = -fno-builtin-ffmal
 CFLAGS-nldbl-finite.c = -fno-builtin-finitel
 CFLAGS-nldbl-floor.c = -fno-builtin-floorl
 CFLAGS-nldbl-fma.c = -fno-builtin-fmal
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-dfma.c b/sysdeps/ieee754/ldbl-opt/nldbl-dfma.c
new file mode 100644
index 0000000000..291f3e092f
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-dfma.c
@@ -0,0 +1,28 @@
+/* Compatibility routine for IEEE double as long double for dfma.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define dfmal __hide_dfmal
+#include "nldbl-compat.h"
+#undef dfmal
+
+double
+attribute_hidden
+dfmal (double x, double y, double z)
+{
+  return fma (x, y, z);
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-ffma.c b/sysdeps/ieee754/ldbl-opt/nldbl-ffma.c
new file mode 100644
index 0000000000..feabea512e
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-ffma.c
@@ -0,0 +1,28 @@
+/* Compatibility routine for IEEE double as long double for ffma.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define ffmal __hide_ffmal
+#include "nldbl-compat.h"
+#undef ffmal
+
+float
+attribute_hidden
+ffmal (double x, double y, double z)
+{
+  return ffma (x, y, z);
+}
diff --git a/sysdeps/ieee754/soft-fp/s_dfmal.c b/sysdeps/ieee754/soft-fp/s_dfmal.c
new file mode 100644
index 0000000000..6e8b081a9e
--- /dev/null
+++ b/sysdeps/ieee754/soft-fp/s_dfmal.c
@@ -0,0 +1,74 @@
+/* Fused multiply-add of long double (ldbl-128) values, narrowing the result to
+   double, using soft-fp.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32xfmaf64x __hide_f32xfmaf64x
+#define f32xfmaf128 __hide_f32xfmaf128
+#define f64fmaf64x __hide_f64fmaf64x
+#define f64fmaf128 __hide_f64fmaf128
+#include <math.h>
+#undef f32xfmaf64x
+#undef f32xfmaf128
+#undef f64fmaf64x
+#undef f64fmaf128
+
+#include <math-narrow.h>
+#include <libc-diag.h>
+
+/* R_e is not set in cases where it is not used in packing, but the
+   compiler does not see that it is set in all cases where it is
+   used, resulting in warnings that it may be used uninitialized.
+   The location of the warning differs in different versions of GCC,
+   it may be where R is defined using a macro or it may be where the
+   macro is defined.  */
+DIAG_PUSH_NEEDS_COMMENT;
+DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmaybe-uninitialized");
+
+#include <soft-fp.h>
+#include <double.h>
+#include <quad.h>
+
+double
+__dfmal (_Float128 x, _Float128 y, _Float128 z)
+{
+  FP_DECL_EX;
+  FP_DECL_Q (X);
+  FP_DECL_Q (Y);
+  FP_DECL_Q (Z);
+  FP_DECL_Q (R);
+  FP_DECL_D (RN);
+  double ret;
+
+  FP_INIT_ROUNDMODE;
+  FP_UNPACK_Q (X, x);
+  FP_UNPACK_Q (Y, y);
+  FP_UNPACK_Q (Z, z);
+  FP_FMA_Q (R, X, Y, Z);
+#if _FP_W_TYPE_SIZE < 64
+  FP_TRUNC_COOKED (D, Q, 2, 4, RN, R);
+#else
+  FP_TRUNC_COOKED (D, Q, 1, 2, RN, R);
+#endif
+  FP_PACK_D (ret, RN);
+  FP_HANDLE_EXCEPTIONS;
+  CHECK_NARROW_FMA (ret, x, y, z);
+  return ret;
+}
+DIAG_POP_NEEDS_COMMENT;
+
+libm_alias_double_ldouble (fma)
diff --git a/sysdeps/ieee754/soft-fp/s_ffma.c b/sysdeps/ieee754/soft-fp/s_ffma.c
new file mode 100644
index 0000000000..3ab5844b0b
--- /dev/null
+++ b/sysdeps/ieee754/soft-fp/s_ffma.c
@@ -0,0 +1,72 @@
+/* Fused multiply-add of double values, narrowing the result to float,
+   using soft-fp.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32fmaf64 __hide_f32fmaf64
+#define f32fmaf32x __hide_f32fmaf32x
+#define ffmal __hide_ffmal
+#include <math.h>
+#undef f32fmaf64
+#undef f32fmaf32x
+#undef ffmal
+
+#include <math-narrow.h>
+#include <libc-diag.h>
+
+/* R_e is not set in cases where it is not used in packing, but the
+   compiler does not see that it is set in all cases where it is
+   used, resulting in warnings that it may be used uninitialized.
+   The location of the warning differs in different versions of GCC,
+   it may be where R is defined using a macro or it may be where the
+   macro is defined.  */
+DIAG_PUSH_NEEDS_COMMENT;
+DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmaybe-uninitialized");
+
+#include <soft-fp.h>
+#include <single.h>
+#include <double.h>
+
+float
+__ffma (double x, double y, double z)
+{
+  FP_DECL_EX;
+  FP_DECL_D (X);
+  FP_DECL_D (Y);
+  FP_DECL_D (Z);
+  FP_DECL_D (R);
+  FP_DECL_S (RN);
+  float ret;
+
+  FP_INIT_ROUNDMODE;
+  FP_UNPACK_D (X, x);
+  FP_UNPACK_D (Y, y);
+  FP_UNPACK_D (Z, z);
+  FP_FMA_D (R, X, Y, Z);
+#if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
+  FP_TRUNC_COOKED (S, D, 1, 2, RN, R);
+#else
+  FP_TRUNC_COOKED (S, D, 1, 1, RN, R);
+#endif
+  FP_PACK_S (ret, RN);
+  FP_HANDLE_EXCEPTIONS;
+  CHECK_NARROW_FMA (ret, x, y, z);
+  return ret;
+}
+DIAG_POP_NEEDS_COMMENT;
+
+libm_alias_float_double (fma)
diff --git a/sysdeps/ieee754/soft-fp/s_ffmal.c b/sysdeps/ieee754/soft-fp/s_ffmal.c
new file mode 100644
index 0000000000..15e537e978
--- /dev/null
+++ b/sysdeps/ieee754/soft-fp/s_ffmal.c
@@ -0,0 +1,70 @@
+/* Fused multiply-add of long double (ldbl-128) values, narrowing the result to
+   float, using soft-fp.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define f32fmaf64x __hide_f32fmaf64x
+#define f32fmaf128 __hide_f32fmaf128
+#include <math.h>
+#undef f32fmaf64x
+#undef f32fmaf128
+
+#include <math-narrow.h>
+#include <libc-diag.h>
+
+/* R_e is not set in cases where it is not used in packing, but the
+   compiler does not see that it is set in all cases where it is
+   used, resulting in warnings that it may be used uninitialized.
+   The location of the warning differs in different versions of GCC,
+   it may be where R is defined using a macro or it may be where the
+   macro is defined.  */
+DIAG_PUSH_NEEDS_COMMENT;
+DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmaybe-uninitialized");
+
+#include <soft-fp.h>
+#include <single.h>
+#include <quad.h>
+
+float
+__ffmal (_Float128 x, _Float128 y, _Float128 z)
+{
+  FP_DECL_EX;
+  FP_DECL_Q (X);
+  FP_DECL_Q (Y);
+  FP_DECL_Q (Z);
+  FP_DECL_Q (R);
+  FP_DECL_S (RN);
+  float ret;
+
+  FP_INIT_ROUNDMODE;
+  FP_UNPACK_Q (X, x);
+  FP_UNPACK_Q (Y, y);
+  FP_UNPACK_Q (Z, z);
+  FP_FMA_Q (R, X, Y, Z);
+#if _FP_W_TYPE_SIZE < 64
+  FP_TRUNC_COOKED (S, Q, 1, 4, RN, R);
+#else
+  FP_TRUNC_COOKED (S, Q, 1, 2, RN, R);
+#endif
+  FP_PACK_S (ret, RN);
+  FP_HANDLE_EXCEPTIONS;
+  CHECK_NARROW_FMA (ret, x, y, z);
+  return ret;
+}
+DIAG_POP_NEEDS_COMMENT;
+
+libm_alias_float_ldouble (fma)
diff --git a/sysdeps/ieee754/soft-fp/s_fma.c b/sysdeps/ieee754/soft-fp/s_fma.c
index 4b0d6b50aa..d3870452dd 100644
--- a/sysdeps/ieee754/soft-fp/s_fma.c
+++ b/sysdeps/ieee754/soft-fp/s_fma.c
@@ -26,9 +26,14 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define NO_MATH_REDIRECT
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <libc-diag.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 /* R_e is not set in cases where it is not used in packing, but the
    compiler does not see that it is set in all cases where it is
@@ -66,4 +71,5 @@ DIAG_POP_NEEDS_COMMENT;
 
 #ifndef __fma
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
 #endif
diff --git a/sysdeps/ieee754/soft-fp/s_fmal.c b/sysdeps/ieee754/soft-fp/s_fmal.c
index aecec13923..7be917a46e 100644
--- a/sysdeps/ieee754/soft-fp/s_fmal.c
+++ b/sysdeps/ieee754/soft-fp/s_fmal.c
@@ -26,9 +26,12 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define NO_MATH_REDIRECT
+#define f64xfmaf128 __hide_f64xfmaf128
 #include <math.h>
+#undef f64xfmaf128
 #include <libc-diag.h>
 #include <libm-alias-ldouble.h>
+#include <math-narrow-alias.h>
 
 /* R_e is not set in cases where it is not used in packing, but the
    compiler does not see that it is set in all cases where it is
@@ -65,3 +68,4 @@ __fmal (long double a, long double b, long double c)
 DIAG_POP_NEEDS_COMMENT;
 
 libm_alias_ldouble (__fma, fma)
+libm_alias_ldouble_narrow (__fma, fma)
diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist
index 1a107a67dc..51e1bc00fd 100644
--- a/sysdeps/mach/hurd/i386/libm.abilist
+++ b/sysdeps/mach/hurd/i386/libm.abilist
@@ -1089,16 +1089,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index fda4ca4106..5f2b90bc74 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -1250,12 +1250,28 @@ ldouble: 1
 Function: "fma_downward":
 ldouble: 1
 
+Function: "fma_downward_ldouble":
+double: 1
+float: 1
+
+Function: "fma_ldouble":
+double: 1
+float: 1
+
 Function: "fma_towardzero":
 ldouble: 2
 
+Function: "fma_towardzero_ldouble":
+double: 1
+float: 1
+
 Function: "fma_upward":
 ldouble: 3
 
+Function: "fma_upward_ldouble":
+double: 1
+float: 1
+
 Function: "fmod":
 ldouble: 1
 
diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-macros.h b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-macros.h
index abab686aa9..6d6f6b5029 100644
--- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-macros.h
+++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-macros.h
@@ -24,11 +24,13 @@
    from _Float128 implementation objects.  */
 #include <libm-alias-float128.h>
 #include <libm-alias-finite.h>
+#include <math-narrow-alias.h>
 
 #undef libm_alias_float128_r
 #undef libm_alias_finite
 #undef libm_alias_exclusive_ldouble
 #undef libm_alias_float128_other_r_ldbl
+#undef libm_alias_float128_narrow
 #undef declare_mgen_finite_alias
 #undef declare_mgen_alias
 #undef declare_mgen_alias_r
@@ -38,6 +40,7 @@
 #define libm_alias_float128_r(from, to, r)
 #define libm_alias_exclusive_ldouble(from, to)
 #define libm_alias_float128_other_r_ldbl(from, to, r)
+#define libm_alias_float128_narrow(from, to)
 #define declare_mgen_finite_alias(from, to)
 #define declare_mgen_alias(from, to)
 #define declare_mgen_alias_r(from, to)
diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc.h b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc.h
index 392c66b63d..bbe8057426 100644
--- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc.h
+++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc.h
@@ -27,8 +27,10 @@
 
 /* Include the real math.h to avoid optimizations caused by include/math.h
    (e.x fabsf128 prototype is masked by an inline definition).*/
+#define f64xfmaf128 __hide_f64xfmaf128
 #define f64xsqrtf128 __hide_f64xsqrtf128
 #include <math/math.h>
+#undef f64xfmaf128
 #undef f64xsqrtf128
 #include <math_private.h>
 #include <complex.h>
@@ -152,6 +154,9 @@
 /* scalbnf128 is an alias of ldexpf128.  */
 #define DECL_ALIAS_s_ldexp(f) MAKE_IFUNCP_R (f,) MAKE_IFUNCP_WRAP_R (wrap_, scalbn,)
 
+/* f64xfmaf128 is an alias of fmaf128.  */
+#define DECL_ALIAS_s_fma(f) MAKE_IFUNCP_R (f,) libm_alias_float128_narrow (__fma, fma)
+
 /* f64xsqrtf128 is an alias of sqrtf128.  */
 #define DECL_ALIAS_w_sqrt(f) MAKE_IFUNCP_R (f,) libm_alias_float128_narrow (__sqrt, sqrt)
 
diff --git a/sysdeps/riscv/rvd/s_fma.c b/sysdeps/riscv/rvd/s_fma.c
index 7f39cefc71..e52751ff2c 100644
--- a/sysdeps/riscv/rvd/s_fma.c
+++ b/sysdeps/riscv/rvd/s_fma.c
@@ -17,10 +17,15 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define NO_MATH_REDIRECT
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <fenv.h>
 #include <ieee754.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 double
 __fma (double x, double y, double z)
@@ -29,3 +34,4 @@ __fma (double x, double y, double z)
   return x;
 }
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
index 95f2cea66c..e09eb1a679 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
@@ -1,11 +1,17 @@
 #define NO_MATH_REDIRECT
 #include <sparc-ifunc.h>
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <math_ldbl_opt.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 extern double __fma_vis3 (double, double, double);
 extern double __fma_generic (double, double, double);
 
 sparc_libm_ifunc(__fma, hwcap & HWCAP_SPARC_FMAF ? __fma_vis3 : __fma_generic);
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
index 44066eed46..abaa6acbe1 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
@@ -1,7 +1,12 @@
 #define NO_MATH_REDIRECT
 #include <sparc-ifunc.h>
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 extern __typeof (fma) __fma_vis3 attribute_hidden;
 extern __typeof (fma) __fma_generic attribute_hidden;
@@ -11,3 +16,4 @@ sparc_libm_ifunc (__fma,
 		  ? __fma_vis3
 		  : __fma_generic);
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
diff --git a/sysdeps/unix/sysv/linux/aarch64/libm.abilist b/sysdeps/unix/sysv/linux/aarch64/libm.abilist
index 74f203575f..9bf30560a0 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libm.abilist
@@ -1054,16 +1054,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/alpha/libm.abilist b/sysdeps/unix/sysv/linux/alpha/libm.abilist
index e3c619e77a..a1ad3c7682 100644
--- a/sysdeps/unix/sysv/linux/alpha/libm.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libm.abilist
@@ -1111,17 +1111,30 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 __clog10l F
diff --git a/sysdeps/unix/sysv/linux/arc/libm.abilist b/sysdeps/unix/sysv/linux/arc/libm.abilist
index cedb2ffcc4..32aa436456 100644
--- a/sysdeps/unix/sysv/linux/arc/libm.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libm.abilist
@@ -697,9 +697,15 @@ GLIBC_2.32 ynf32 F
 GLIBC_2.32 ynf32x F
 GLIBC_2.32 ynf64 F
 GLIBC_2.32 ynl F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libm.abilist b/sysdeps/unix/sysv/linux/arm/be/libm.abilist
index 97f328dbbd..6567ac7730 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libm.abilist
@@ -471,10 +471,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 _LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/arm/le/libm.abilist b/sysdeps/unix/sysv/linux/arm/le/libm.abilist
index 97f328dbbd..6567ac7730 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libm.abilist
@@ -471,10 +471,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 _LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/csky/libm.abilist b/sysdeps/unix/sysv/linux/csky/libm.abilist
index 88761113e6..e76270cf1d 100644
--- a/sysdeps/unix/sysv/linux/csky/libm.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libm.abilist
@@ -763,9 +763,15 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/hppa/libm.abilist b/sysdeps/unix/sysv/linux/hppa/libm.abilist
index c32ff03983..8c80c9f2af 100644
--- a/sysdeps/unix/sysv/linux/hppa/libm.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libm.abilist
@@ -782,10 +782,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 exp2l F
diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist
index 2a2b290dc9..51ebd7f227 100644
--- a/sysdeps/unix/sysv/linux/i386/libm.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libm.abilist
@@ -1096,16 +1096,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/ia64/libm.abilist b/sysdeps/unix/sysv/linux/ia64/libm.abilist
index 47511731f8..a817771484 100644
--- a/sysdeps/unix/sysv/linux/ia64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libm.abilist
@@ -1026,16 +1026,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
index 97f328dbbd..6567ac7730 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
@@ -471,10 +471,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 _LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist
index 6925a90820..3503533664 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist
@@ -822,9 +822,15 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
index 65ade6d272..3115cd6afe 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
@@ -783,9 +783,15 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
index 65ade6d272..3115cd6afe 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
@@ -783,9 +783,15 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
index f53f8d86c5..82995a9c3b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
@@ -782,10 +782,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 exp2l F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
index 1abb41514c..df8eaa2dba 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
@@ -1054,16 +1054,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/nios2/libm.abilist b/sysdeps/unix/sysv/linux/nios2/libm.abilist
index 8cac2ab005..df148c1990 100644
--- a/sysdeps/unix/sysv/linux/nios2/libm.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libm.abilist
@@ -783,9 +783,15 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
index 6c70bd6de3..ff9046d243 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
@@ -828,10 +828,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 __clog10l F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
index dd7f2c30c9..24cfb00ce6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
@@ -827,10 +827,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 __clog10l F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
index aac3ff683f..29d4892722 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
@@ -821,10 +821,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 __clog10l F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
index 7fe920d4d4..07753c0cce 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
@@ -1214,18 +1214,33 @@ GLIBC_2.32 __y0ieee128 F
 GLIBC_2.32 __y1ieee128 F
 GLIBC_2.32 __ynieee128 F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 __f32fmaieee128 F
 GLIBC_2.35 __f32sqrtieee128 F
+GLIBC_2.35 __f64fmaieee128 F
 GLIBC_2.35 __f64sqrtieee128 F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist
index a8638faa6f..ed5bd3bf6b 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist
@@ -938,16 +938,29 @@ GLIBC_2.33 ynf32x F
 GLIBC_2.33 ynf64 F
 GLIBC_2.33 ynf64x F
 GLIBC_2.33 ynl F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist
index dc682a7c52..e592d9da6e 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist
@@ -1035,16 +1035,29 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
index 5d2abaa2db..6f55647398 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
@@ -1055,17 +1055,30 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 __clog10l F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
index f41c9f7a29..237a880c6a 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
@@ -1055,17 +1055,30 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 __clog10l F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libm.abilist b/sysdeps/unix/sysv/linux/sh/be/libm.abilist
index 6a379eced4..bdd8edfa13 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libm.abilist
@@ -782,10 +782,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 exp2l F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libm.abilist b/sysdeps/unix/sysv/linux/sh/le/libm.abilist
index 6a379eced4..bdd8edfa13 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libm.abilist
@@ -782,10 +782,16 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32xfmaf64 F
 GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 exp2l F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
index e06572a3f9..76ab323332 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
@@ -1062,17 +1062,30 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
 GLIBC_2.4 __clog10l F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
index 6d1e4ae31a..d1c2fe6714 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
@@ -1054,16 +1054,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
index 7185df2a42..13e1d9f0c8 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
@@ -1087,16 +1087,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist
index 9b29d72d2e..40b5f7f9b0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist
@@ -1087,16 +1087,29 @@ GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
 GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
 GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
 GLIBC_2.35 f32sqrtf128 F
 GLIBC_2.35 f32sqrtf32x F
 GLIBC_2.35 f32sqrtf64 F
 GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
 GLIBC_2.35 f32xsqrtf128 F
 GLIBC_2.35 f32xsqrtf64 F
 GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
 GLIBC_2.35 f64sqrtf128 F
 GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
 GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
 GLIBC_2.35 fsqrt F
 GLIBC_2.35 fsqrtl F
diff --git a/sysdeps/x86_64/fpu/multiarch/s_fma.c b/sysdeps/x86_64/fpu/multiarch/s_fma.c
index 89389dd77f..fedce2c2c7 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fma.c
@@ -18,9 +18,14 @@
 
 #define NO_MATH_REDIRECT
 #include <config.h>
+#define dfmal __hide_dfmal
+#define f32xfmaf64 __hide_f32xfmaf64
 #include <math.h>
+#undef dfmal
+#undef f32xfmaf64
 #include <init-arch.h>
 #include <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 extern double __fma_sse2 (double x, double y, double z) attribute_hidden;
 
@@ -45,6 +50,7 @@ libm_ifunc (__fma, CPU_FEATURE_USABLE (FMA)
 	    ? __fma_fma3 : (CPU_FEATURE_USABLE (FMA4)
 			    ? __fma_fma4 : __fma_sse2));
 libm_alias_double (__fma, fma)
+libm_alias_double_narrow (__fma, fma)
 
 #define __fma __fma_sse2