diff mbox series

Add narrowing fma functions

Message ID alpine.DEB.2.22.394.2109222125580.37774@digraph.polyomino.org.uk
State New
Headers show
Series Add narrowing fma functions | expand

Commit Message

Joseph Myers Sept. 22, 2021, 9:26 p.m. UTC
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).

---

Committed.  Diffs to generated files auto-libm-test-out-* omitted
below.

Comments

H.J. Lu Sept. 23, 2021, 12:35 a.m. UTC | #1
On Wed, Sep 22, 2021 at 2:27 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> 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).
>
> ---
>
> Committed.  Diffs to generated files auto-libm-test-out-* omitted
> below.
>

On Linux/i686, I got

FAIL: math/test-float-double-fma
FAIL: math/test-float32-float32x-fma
FAIL: math/test-float32-float64-fma

Do the new FMA tests require SSE math?
Joseph Myers Sept. 23, 2021, 9:21 p.m. UTC | #2
On Wed, 22 Sep 2021, H.J. Lu via Libc-alpha wrote:

> On Linux/i686, I got
> 
> FAIL: math/test-float-double-fma
> FAIL: math/test-float32-float32x-fma
> FAIL: math/test-float32-float64-fma
> 
> Do the new FMA tests require SSE math?

No.  I could only reproduce those failures for 32-bit if I used 
-mfpmath=sse; I hope they are fixed by my commit 
4ed7a383f9a8468194ccaebba3f0fa659003888d, "Fix ffma use of round-to-odd on 
x86".  If you still see such failures after that commit, I'll need more 
details of exactly what is failing and the compiler / glibc configuration.
H.J. Lu Sept. 23, 2021, 10:42 p.m. UTC | #3
On Thu, Sep 23, 2021 at 2:21 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Wed, 22 Sep 2021, H.J. Lu via Libc-alpha wrote:
>
> > On Linux/i686, I got
> >
> > FAIL: math/test-float-double-fma
> > FAIL: math/test-float32-float32x-fma
> > FAIL: math/test-float32-float64-fma
> >
> > Do the new FMA tests require SSE math?
>
> No.  I could only reproduce those failures for 32-bit if I used
> -mfpmath=sse; I hope they are fixed by my commit
> 4ed7a383f9a8468194ccaebba3f0fa659003888d, "Fix ffma use of round-to-odd on
> x86".  If you still see such failures after that commit, I'll need more
> details of exactly what is failing and the compiler / glibc configuration.

It makes no difference:
[hjl@gnu-gram-1 build-i686-linux]$ cat math/test-float-double-fma.out
testing float (argument double)
Failure: fma_double (0x8p-152, -0x8p-152, -0x3.fffff8p-128): Exception
"Underflow" not set
Failure: fma_double (0x8p-152, -0x8p-152, 0x3.fffff8p-128): Exception
"Underflow" not set
Failure: fma_double (0x8p-152, 0x8p-152, -0x3.fffff8p-128): Exception
"Underflow" not set
Failure: fma_double (0x8p-152, 0x8p-152, 0x3.fffff8p-128): Exception
"Underflow" not set
Failure: fma_double (0x8p-152, -0x8p-152, -0x8p-152): Exception
"Underflow" not set
Failure: fma_double (0x8p-152, -0x8p-152, 0x8p-152): Exception
"Underflow" not set
Failure: fma_double (0x8p-152, 0x8p-152, -0x8p-152): Exception
"Underflow" not set
Failure: fma_double (0x8p-152, 0x8p-152, 0x8p-152): Exception
"Underflow" not set
Failure: Test: fma_double (0x2.fffp+12, 0x1.000002p+0, 0x1.ffffp-24)
Result:
 is:          1.22870020e+04   0x1.7ff804p+13
 should be:   1.22870010e+04   0x1.7ff802p+13
 difference:  9.76562500e-04   0x1.000000p-10
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: fma_downward_double (0x8p-152, 0x8p-152, -0x3.fffff8p-128):
Exception "Underflow" not set
Failure: fma_downward_double (0x8p-152, 0x8p-152, 0x3.fffff8p-128):
Exception "Underflow" not set
Failure: fma_downward_double (0x8p-152, 0x8p-152, -0x8p-152):
Exception "Underflow" not set
Failure: fma_downward_double (0x8p-152, 0x8p-152, 0x8p-152): Exception
"Underflow" not set
Failure: fma_towardzero_double (0x8p-152, -0x8p-152,
-0x3.fffff8p-128): Exception "Underflow" not set
Failure: fma_towardzero_double (0x8p-152, 0x8p-152, 0x3.fffff8p-128):
Exception "Underflow" not set
Failure: fma_towardzero_double (0x8p-152, -0x8p-152, -0x8p-152):
Exception "Underflow" not set
Failure: fma_towardzero_double (0x8p-152, 0x8p-152, 0x8p-152):
Exception "Underflow" not set
Failure: fma_upward_double (0x8p-152, -0x8p-152, -0x3.fffff8p-128):
Exception "Underflow" not set
Failure: fma_upward_double (0x8p-152, -0x8p-152, 0x3.fffff8p-128):
Exception "Underflow" not set
Failure: fma_upward_double (0x8p-152, -0x8p-152, -0x8p-152): Exception
"Underflow" not set
Failure: fma_upward_double (0x8p-152, -0x8p-152, 0x8p-152): Exception
"Underflow" not set

Test suite completed:
  2416 test cases plus 2412 tests for exception flags and
    2412 tests for errno executed.
  21 errors occurred.
[hjl@gnu-gram-1 build-i686-linux]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-gcc-major-version-only
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --enable-cet --with-tune=generic
--with-arch_32=i686 --with-multilib-list=m32,m64,mx32
--build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC)
[hjl@gnu-gram-1 build-i686-linux]$

I am using GCC in Fedora 34.
Joseph Myers Sept. 24, 2021, 12:40 p.m. UTC | #4
On Thu, 23 Sep 2021, H.J. Lu wrote:

> It makes no difference:

Thanks.  A couple of questions:

1. Does the patch below, removing the __SSE2_MATH__ conditional, help?

2. Is this on hardware with FMA instruction support?

diff --git a/sysdeps/x86/fpu/s_ffma.c b/sysdeps/x86/fpu/s_ffma.c
index 95c2dcd7b7..da4bb55f9a 100644
--- a/sysdeps/x86/fpu/s_ffma.c
+++ b/sysdeps/x86/fpu/s_ffma.c
@@ -27,10 +27,14 @@
 
 #include <math-narrow.h>
 
-#if defined __SSE2_MATH__ && !defined __FP_FAST_FMA
+#ifndef __FP_FAST_FMA
 /* Depending on the details of the glibc configuration, fma might use
    either SSE or 387 arithmetic; ensure that both parts of the
-   floating-point state are handled in the round-to-odd code.  */
+   floating-point state are handled in the round-to-odd code.  If
+   __FP_FAST_FMA is defined, that implies that the compiler is using
+   SSE floating point and that the fma call will be inlined, so the
+   x86 macros will work with only the SSE state and that is
+   sufficient.  */
 # undef libc_feholdexcept_setround
 # define libc_feholdexcept_setround	default_libc_feholdexcept_setround
 # undef libc_feupdateenv_test
Carlos O'Donell Sept. 24, 2021, 2:29 p.m. UTC | #5
On 9/22/21 17:26, Joseph Myers wrote:
> 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).
> 
> ---
> 
> Committed.  Diffs to generated files auto-libm-test-out-* omitted
> below.

DJ,

With CI/CD  this failed to apply because it was committed.

https://patchwork.sourceware.org/project/glibc/patch/alpine.DEB.2.22.394.2109222125580.37774@digraph.polyomino.org.uk/

Do we have a check to make sure we don't try to apply committed patches?
H.J. Lu Sept. 24, 2021, 3:25 p.m. UTC | #6
On Fri, Sep 24, 2021 at 5:40 AM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Thu, 23 Sep 2021, H.J. Lu wrote:
>
> > It makes no difference:
>
> Thanks.  A couple of questions:
>
> 1. Does the patch below, removing the __SSE2_MATH__ conditional, help?

Yes, it works.

> 2. Is this on hardware with FMA instruction support?

Yes.  My CPU is Intel Core i7-8550U.

> diff --git a/sysdeps/x86/fpu/s_ffma.c b/sysdeps/x86/fpu/s_ffma.c
> index 95c2dcd7b7..da4bb55f9a 100644
> --- a/sysdeps/x86/fpu/s_ffma.c
> +++ b/sysdeps/x86/fpu/s_ffma.c
> @@ -27,10 +27,14 @@
>
>  #include <math-narrow.h>
>
> -#if defined __SSE2_MATH__ && !defined __FP_FAST_FMA
> +#ifndef __FP_FAST_FMA
>  /* Depending on the details of the glibc configuration, fma might use
>     either SSE or 387 arithmetic; ensure that both parts of the
> -   floating-point state are handled in the round-to-odd code.  */
> +   floating-point state are handled in the round-to-odd code.  If
> +   __FP_FAST_FMA is defined, that implies that the compiler is using
> +   SSE floating point and that the fma call will be inlined, so the
> +   x86 macros will work with only the SSE state and that is
> +   sufficient.  */
>  # undef libc_feholdexcept_setround
>  # define libc_feholdexcept_setround    default_libc_feholdexcept_setround
>  # undef libc_feupdateenv_test
>
> --
> Joseph S. Myers
> joseph@codesourcery.com

Thanks.
DJ Delorie Sept. 24, 2021, 4:32 p.m. UTC | #7
"Carlos O'Donell" <carlos@redhat.com> writes:
> Do we have a check to make sure we don't try to apply committed patches?

I look for the word "committed" in the subject, that's all.
diff mbox series

Patch

diff --git a/NEWS b/NEWS
index 3e3c074238..889578bf39 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,9 @@  Major new features:
   - fsqrt, fsqrtl, dsqrtl and corresponding fMsqrtfN, fMsqrtfNx,
     fMxsqrtfN and fMxsqrtfNx functions.
 
+  - ffma, ffmal, dfmal and corresponding fMfmafN, fMfmafNx, fMxfmafN and
+    fMxfmafNx functions.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The r_version update in the debugger interface makes the glibc binary
diff --git a/manual/arith.texi b/manual/arith.texi
index edf1fd71f8..6a158e624d 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -2289,6 +2289,27 @@  function without any intermediate rounding to the type of the
 arguments.
 @end deftypefun
 
+@deftypefun float ffma (double @var{x}, double @var{y}, double @var{z})
+@deftypefunx float ffmal (long double @var{x}, long double @var{y}, long double @var{z})
+@deftypefunx double dfmal (long double @var{x}, long double @var{y}, long double @var{z})
+@deftypefunx _FloatM fMfmafN (_Float@var{N} @var{x}, _Float@var{N} @var{y}, _Float@var{N} @var{z})
+@deftypefunx _FloatM fMfmafNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}, _Float@var{N}x @var{z})
+@deftypefunx _FloatMx fMxfmafN (_Float@var{N} @var{x}, _Float@var{N} @var{y}, _Float@var{N} @var{z})
+@deftypefunx _FloatMx fMxfmafNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}, _Float@var{N}x @var{z})
+@standards{TS 18661-1:2014, math.h}
+@standardsx{fMfmafN, TS 18661-3:2015, math.h}
+@standardsx{fMfmafNx, TS 18661-3:2015, math.h}
+@standardsx{fMxfmafN, TS 18661-3:2015, math.h}
+@standardsx{fMxfmafNx, TS 18661-3:2015, math.h}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+
+These functions, from TS 18661-1:2014 and TS 18661-3:2015, return
+@math{(@var{x} @mul{} @var{y}) + @var{z}}, rounded once to the return
+type of the function without any intermediate rounding to the type of
+the arguments and without any intermediate rounding of result of the
+multiplication.
+@end deftypefun
+
 @node Complex Numbers
 @section Complex Numbers
 @pindex complex.h
diff --git a/math/Makefile b/math/Makefile
index 987e9841f9..8d67bfff7e 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -91,7 +91,7 @@  libm-compat-calls =							\
 	w_lgammaF_r_compat w_lgammaF_compat2 w_expF_compat		\
 	w_lgamma_compatF k_standardF
 
-libm-narrow-fns = add div mul sqrt sub
+libm-narrow-fns = add div fma mul sqrt sub
 libm-narrow-types-basic = s_fF s_f32xFf64
 libm-narrow-types-ldouble-yes = s_fFl s_dFl
 libm-narrow-types-float128-yes = s_f32Ff128 s_f64Ff128 s_f64xFf128
@@ -299,7 +299,7 @@  libm-test-funcs-noauto = canonicalize ceil cimag conj copysign cproj creal \
 			 significand totalorder totalordermag trunc ufromfp \
 			 ufromfpx compat_totalorder compat_totalordermag
 libm-test-funcs-compat = compat_totalorder compat_totalordermag
-libm-test-funcs-narrow = add div mul sqrt sub
+libm-test-funcs-narrow = add div fma mul sqrt sub
 libm-test-funcs-all = $(libm-test-funcs-auto) $(libm-test-funcs-noauto)
 libm-test-c-auto = $(foreach f,$(libm-test-funcs-auto),libm-test-$(f).c)
 libm-test-c-noauto = $(foreach f,$(libm-test-funcs-noauto),libm-test-$(f).c)
@@ -663,6 +663,7 @@  CFLAGS-s_ctan.c += -fno-builtin-ctanl
 CFLAGS-s_ctanh.c += -fno-builtin-ctanhl
 CFLAGS-s_dadd.c += -fno-builtin-daddl
 CFLAGS-s_ddiv.c += -fno-builtin-ddivl
+CFLAGS-s_dfma.c += -fno-builtin-dfmal
 CFLAGS-s_dmul.c += -fno-builtin-dmull
 CFLAGS-s_dsqrt.c += -fno-builtin-dsqrtl
 CFLAGS-s_dsub.c += -fno-builtin-dsubl
@@ -676,6 +677,7 @@  CFLAGS-s_fabs.c += -fno-builtin-fabsl
 CFLAGS-s_fadd.c += -fno-builtin-faddl
 CFLAGS-s_fdim.c += -fno-builtin-fdiml
 CFLAGS-s_fdiv.c += -fno-builtin-fdivl
+CFLAGS-s_ffma.c += -fno-builtin-ffmal
 CFLAGS-s_finite.c += -fno-builtin-finitel
 CFLAGS-s_floor.c += -fno-builtin-floorl
 CFLAGS-s_fma.c += -fno-builtin-fmal
diff --git a/math/Versions b/math/Versions
index b121b454cd..1a25b2ce9a 100644
--- a/math/Versions
+++ b/math/Versions
@@ -595,9 +595,14 @@  libm {
   }
   GLIBC_2.35 {
     # Functions not involving _Float64x or _Float128, for all configurations.
+    ffma; ffmal; dfmal;
+    f32fmaf32x; f32fmaf64; f32xfmaf64;
     fsqrt; fsqrtl; dsqrtl;
     f32sqrtf32x; f32sqrtf64; f32xsqrtf64;
     # Functions involving _Float64x or _Float128, for some configurations.
+    f32fmaf64x; f32fmaf128;
+    f32xfmaf64x; f32xfmaf128; f64fmaf64x; f64fmaf128;
+    f64xfmaf128;
     f32sqrtf64x; f32sqrtf128;
     f32xsqrtf64x; f32xsqrtf128; f64sqrtf64x; f64sqrtf128;
     f64xsqrtf128;
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 0992344f7f..52a529682d 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -5463,15 +5463,16 @@  fma -1.0 -1.0 -1.0
 
 fma 0 0 1
 fma 0 0 2
-fma 0 0 max xfail-rounding:ibm128-libgcc
+fma 0 0 max xfail-rounding:ibm128-libgcc missing-errno
 fma 0 1 1
 fma 1 0 1
 fma 0 1 2
 fma 1 0 2
-fma 0 1 max xfail-rounding:ibm128-libgcc
-fma 1 0 max xfail-rounding:ibm128-libgcc
+fma 0 1 max xfail-rounding:ibm128-libgcc missing-errno
+fma 1 0 max xfail-rounding:ibm128-libgcc missing-errno
 
-# Bug 6801: errno setting may be missing.
+# Bug 6801: errno setting may be missing.  This applies to both plain
+# and narrowing fma, and is only commented here once.
 fma min min 0 missing-errno
 fma min min -0 missing-errno
 fma min -min 0 missing-errno
@@ -5481,7 +5482,6 @@  fma -min min -0 missing-errno
 fma -min -min 0 missing-errno
 fma -min -min -0 missing-errno
 
-# Bug 6801: errno setting may be missing.
 fma max max min missing-errno
 fma max max -min missing-errno
 fma max -max min missing-errno
@@ -5511,18 +5511,17 @@  fma 0x1p-149 -0x1p-149 0x1p127
 fma 0x1p-149 0x1p-149 -0x1p127
 fma 0x1p-149 -0x1p-149 -0x1p127
 fma 0x1p-149 0x1p-149 0x1p-126
-fma 0x1p-149 -0x1p-149 0x1p-126
-fma 0x1p-149 0x1p-149 -0x1p-126
+fma 0x1p-149 -0x1p-149 0x1p-126 missing-underflow:arg-ibm128
+fma 0x1p-149 0x1p-149 -0x1p-126 missing-underflow:arg-ibm128
 fma 0x1p-149 -0x1p-149 -0x1p-126
-fma 0x1p-149 0x1p-149 0x0.fffffep-126
-fma 0x1p-149 -0x1p-149 0x0.fffffep-126
-fma 0x1p-149 0x1p-149 -0x0.fffffep-126
-fma 0x1p-149 -0x1p-149 -0x0.fffffep-126
-fma 0x1p-149 0x1p-149 0x1p-149
-# Bug 6801: errno setting may be missing.
-fma 0x1p-149 -0x1p-149 0x1p-149 missing-errno
-fma 0x1p-149 0x1p-149 -0x1p-149 missing-errno
-fma 0x1p-149 -0x1p-149 -0x1p-149
+fma 0x1p-149 0x1p-149 0x0.fffffep-126 missing-underflow:arg-ibm128
+fma 0x1p-149 -0x1p-149 0x0.fffffep-126 missing-underflow:arg-ibm128
+fma 0x1p-149 0x1p-149 -0x0.fffffep-126 missing-underflow:arg-ibm128
+fma 0x1p-149 -0x1p-149 -0x0.fffffep-126 missing-underflow:arg-ibm128
+fma 0x1p-149 0x1p-149 0x1p-149 missing-underflow:arg-ibm128
+fma 0x1p-149 -0x1p-149 0x1p-149 missing-errno missing-underflow:arg-ibm128
+fma 0x1p-149 0x1p-149 -0x1p-149 missing-errno missing-underflow:arg-ibm128
+fma 0x1p-149 -0x1p-149 -0x1p-149 missing-underflow:arg-ibm128
 fma 0x0.fffp0 0x0.fffp0 -0x0.ffep0
 fma 0x0.fffp0 -0x0.fffp0 0x0.ffep0
 fma -0x0.fffp0 0x0.fffp0 0x0.ffep0
@@ -5541,172 +5540,167 @@  fma 0x1.fffp+0 0x1.0000000000001p+0 -0x1.fffp+0
 fma 0x1.0000002p+0 0x1.ffffffcp-1 0x1p-300
 fma 0x1.0000002p+0 0x1.ffffffcp-1 -0x1p-300
 fma 0x1.deadbeef2feedp+1023 0x0.deadbeef2feedp-1022 -0x1.a05f8c01a4bfbp+1
-fma 0x1.deadbeef2feedp+900 0x0.deadbeef2feedp-1022 -0x1.a05f8c01a4bfbp-122
-fma 0x1.fffffffffffffp+1023 0x1.001p+0 -0x1.fffffffffffffp+1023
-fma -0x1.fffffffffffffp+1023 0x1.fffffffffffffp+0 0x1.fffffffffffffp+1023
-fma 0x1.fffffffffffffp+1023 2.0 -0x1.fffffffffffffp+1023
-# Bug 6801: errno setting may be missing.
+fma 0x1.deadbeef2feedp+900 0x0.deadbeef2feedp-1022 -0x1.a05f8c01a4bfbp-122 missing-errno
+fma 0x1.fffffffffffffp+1023 0x1.001p+0 -0x1.fffffffffffffp+1023 missing-errno
+fma -0x1.fffffffffffffp+1023 0x1.fffffffffffffp+0 0x1.fffffffffffffp+1023 missing-errno
+fma 0x1.fffffffffffffp+1023 2.0 -0x1.fffffffffffffp+1023 missing-errno
 fma 0x1.6a09e667f3bccp-538 0x1.6a09e667f3bccp-538 0.0 missing-errno
-fma 0x1.deadbeef2feedp-495 0x1.deadbeef2feedp-495 -0x1.bf86a5786a574p-989
-fma 0x1.deadbeef2feedp-503 0x1.deadbeef2feedp-503 -0x1.bf86a5786a574p-1005
-fma 0x1p-537 0x1p-538 0x1p-1074
-fma 0x1.7fffff8p-968 0x1p-106 0x0.000001p-1022
-fma 0x1.4000004p-967 0x1p-106 0x0.000001p-1022
-fma 0x1.4p-967 -0x1p-106 -0x0.000001p-1022
-fma -0x1.19cab66d73e17p-959 0x1.c7108a8c5ff51p-107 -0x0.80b0ad65d9b64p-1022
-fma -0x1.d2eaed6e8e9d3p-979 -0x1.4e066c62ac9ddp-63 -0x0.9245e6b003454p-1022
-fma 0x1.153d650bb9f06p-907 0x1.2d01230d48407p-125 -0x0.b278d5acfc3cp-1022
-fma -0x1.fffffffffffffp-711 0x1.fffffffffffffp-275 0x1.fffffe00007ffp-983
-fma 0x1.4p-1022 0x1.0000000000002p-1 0x1p-1024
-fma -0x1.4p-1022 0x1.0000000000002p-1 -0x1p-1024
-fma 0x1.ffffffffffffcp-1022 0x1.0000000000001p-1 0x1p-1074
-fma -0x1.ffffffffffffcp-1022 0x1.0000000000001p-1 -0x1p-1074
-fma 0x1p-1074 0x1p-1 0x0.fffffffffffffp-1022
-fma -0x1p-1074 0x1p-1 -0x0.fffffffffffffp-1022
-fma 0x1p-1074 0x1.1p-1 0x0.fffffffffffffp-1022
-fma -0x1p-1074 0x1.1p-1 -0x0.fffffffffffffp-1022
-fma 0x1p-1074 0x1p-1074 0x1p1023
-fma 0x1p-1074 -0x1p-1074 0x1p1023
-fma 0x1p-1074 0x1p-1074 -0x1p1023
-fma 0x1p-1074 -0x1p-1074 -0x1p1023
-fma 0x1p-1074 0x1p-1074 0x1p-1022
-fma 0x1p-1074 -0x1p-1074 0x1p-1022
-fma 0x1p-1074 0x1p-1074 -0x1p-1022
-fma 0x1p-1074 -0x1p-1074 -0x1p-1022
-fma 0x1p-1074 0x1p-1074 0x0.fffffffffffffp-1022
-fma 0x1p-1074 -0x1p-1074 0x0.fffffffffffffp-1022
-fma 0x1p-1074 0x1p-1074 -0x0.fffffffffffffp-1022
-fma 0x1p-1074 -0x1p-1074 -0x0.fffffffffffffp-1022
-fma 0x1p-1074 0x1p-1074 0x1p-1074
-# Bug 6801: errno setting may be missing.
+fma 0x1.deadbeef2feedp-495 0x1.deadbeef2feedp-495 -0x1.bf86a5786a574p-989 missing-errno
+fma 0x1.deadbeef2feedp-503 0x1.deadbeef2feedp-503 -0x1.bf86a5786a574p-1005 missing-errno
+fma 0x1p-537 0x1p-538 0x1p-1074 missing-errno
+fma 0x1.7fffff8p-968 0x1p-106 0x0.000001p-1022 missing-errno
+fma 0x1.4000004p-967 0x1p-106 0x0.000001p-1022 missing-errno
+fma 0x1.4p-967 -0x1p-106 -0x0.000001p-1022 missing-errno
+fma -0x1.19cab66d73e17p-959 0x1.c7108a8c5ff51p-107 -0x0.80b0ad65d9b64p-1022 missing-errno
+fma -0x1.d2eaed6e8e9d3p-979 -0x1.4e066c62ac9ddp-63 -0x0.9245e6b003454p-1022 missing-errno
+fma 0x1.153d650bb9f06p-907 0x1.2d01230d48407p-125 -0x0.b278d5acfc3cp-1022 missing-errno
+fma -0x1.fffffffffffffp-711 0x1.fffffffffffffp-275 0x1.fffffe00007ffp-983 missing-errno
+fma 0x1.4p-1022 0x1.0000000000002p-1 0x1p-1024 missing-errno
+fma -0x1.4p-1022 0x1.0000000000002p-1 -0x1p-1024 missing-errno
+fma 0x1.ffffffffffffcp-1022 0x1.0000000000001p-1 0x1p-1074 missing-errno
+fma -0x1.ffffffffffffcp-1022 0x1.0000000000001p-1 -0x1p-1074 missing-errno
+fma 0x1p-1074 0x1p-1 0x0.fffffffffffffp-1022 missing-errno
+fma -0x1p-1074 0x1p-1 -0x0.fffffffffffffp-1022 missing-errno
+fma 0x1p-1074 0x1.1p-1 0x0.fffffffffffffp-1022 missing-errno
+fma -0x1p-1074 0x1.1p-1 -0x0.fffffffffffffp-1022 missing-errno
+fma 0x1p-1074 0x1p-1074 0x1p1023 missing-errno
+fma 0x1p-1074 -0x1p-1074 0x1p1023 missing-errno
+fma 0x1p-1074 0x1p-1074 -0x1p1023 missing-errno
+fma 0x1p-1074 -0x1p-1074 -0x1p1023 missing-errno
+fma 0x1p-1074 0x1p-1074 0x1p-1022 missing-errno
+fma 0x1p-1074 -0x1p-1074 0x1p-1022 missing-errno
+fma 0x1p-1074 0x1p-1074 -0x1p-1022 missing-errno
+fma 0x1p-1074 -0x1p-1074 -0x1p-1022 missing-errno
+fma 0x1p-1074 0x1p-1074 0x0.fffffffffffffp-1022 missing-errno
+fma 0x1p-1074 -0x1p-1074 0x0.fffffffffffffp-1022 missing-errno
+fma 0x1p-1074 0x1p-1074 -0x0.fffffffffffffp-1022 missing-errno
+fma 0x1p-1074 -0x1p-1074 -0x0.fffffffffffffp-1022 missing-errno
+fma 0x1p-1074 0x1p-1074 0x1p-1074 missing-errno
 fma 0x1p-1074 -0x1p-1074 0x1p-1074 missing-errno
 fma 0x1p-1074 0x1p-1074 -0x1p-1074 missing-errno
-fma 0x1p-1074 -0x1p-1074 -0x1p-1074
+fma 0x1p-1074 -0x1p-1074 -0x1p-1074 missing-errno
 fma 0x0.fffffffffffff8p0 0x0.fffffffffffff8p0 -0x0.fffffffffffffp0
 fma 0x0.fffffffffffff8p0 -0x0.fffffffffffff8p0 0x0.fffffffffffffp0
 fma -0x0.fffffffffffff8p0 0x0.fffffffffffff8p0 0x0.fffffffffffffp0
 fma -0x0.fffffffffffff8p0 -0x0.fffffffffffff8p0 -0x0.fffffffffffffp0
-fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 0x1p1023
-fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 0x1p1023
-fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 -0x1p1023
-fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 -0x1p1023
-fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 0x1p970
-fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 0x1p970
-fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 -0x1p970
-fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 -0x1p970
-
-fma -0x8.03fcp+3696 0xf.fffffffffffffffp-6140 0x8.3ffffffffffffffp-2450
-fma 0x9.fcp+2033 -0x8.000e1f000ff800fp-3613 -0xf.fffffffffffc0ffp-1579
-fma 0xc.7fc000003ffffffp-1194 0x8.1e0003fffffffffp+15327 -0x8.fffep+14072
-fma -0x8.0001fc000000003p+1798 0xcp-2230 0x8.f7e000000000007p-468
-fma 0xc.0000000000007ffp+10130 -0x8.000000000000001p+4430 0xc.07000000001ffffp+14513
-fma 0xb.ffffp-4777 0x8.000000fffffffffp-11612 -0x0.3800fff8p-16385
-fma 0x1.4p-16382 0x1.0000000000000004p-1 0x1p-16384
-fma -0x1.4p-16382 0x1.0000000000000004p-1 -0x1p-16384
-fma 0x1.fffffffffffffff8p-16382 0x1.0000000000000002p-1 0x1p-16445
-fma -0x1.fffffffffffffff8p-16382 0x1.0000000000000002p-1 -0x1p-16445
-fma 0x1p-16445 0x1p-1 0x0.fffffffffffffffep-16382
-fma -0x1p-16445 0x1p-1 -0x0.fffffffffffffffep-16382
-fma 0x1p-16445 0x1.1p-1 0x0.fffffffffffffffep-16382
-fma -0x1p-16445 0x1.1p-1 -0x0.fffffffffffffffep-16382
-fma 0x1p-16445 0x1p-16445 0x1p16383
-fma 0x1p-16445 -0x1p-16445 0x1p16383
-fma 0x1p-16445 0x1p-16445 -0x1p16383
-fma 0x1p-16445 -0x1p-16445 -0x1p16383
-fma 0x1p-16445 0x1p-16445 0x1p-16382
-fma 0x1p-16445 -0x1p-16445 0x1p-16382
-fma 0x1p-16445 0x1p-16445 -0x1p-16382
-fma 0x1p-16445 -0x1p-16445 -0x1p-16382
-fma 0x1p-16445 0x1p-16445 0x0.fffffffffffffffep-16382
-fma 0x1p-16445 -0x1p-16445 0x0.fffffffffffffffep-16382
-fma 0x1p-16445 0x1p-16445 -0x0.fffffffffffffffep-16382
-fma 0x1p-16445 -0x1p-16445 -0x0.fffffffffffffffep-16382
-fma 0x1p-16445 0x1p-16445 0x1p-16445
-# Bug 6801: errno setting may be missing.
+fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 0x1p1023 missing-errno
+fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 0x1p1023 missing-errno
+fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 -0x1p1023 missing-errno
+fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 -0x1p1023 missing-errno
+fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 0x1p970 missing-errno
+fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 0x1p970 missing-errno
+fma 0x1.0000000000001p-1022 0x1.0000000000001p-55 -0x1p970 missing-errno
+fma 0x1.0000000000001p-1022 -0x1.0000000000001p-55 -0x1p970 missing-errno
+
+fma -0x8.03fcp+3696 0xf.fffffffffffffffp-6140 0x8.3ffffffffffffffp-2450 missing-errno
+fma 0x9.fcp+2033 -0x8.000e1f000ff800fp-3613 -0xf.fffffffffffc0ffp-1579 missing-errno
+fma 0xc.7fc000003ffffffp-1194 0x8.1e0003fffffffffp+15327 -0x8.fffep+14072 missing-errno
+fma -0x8.0001fc000000003p+1798 0xcp-2230 0x8.f7e000000000007p-468 missing-errno
+fma 0xc.0000000000007ffp+10130 -0x8.000000000000001p+4430 0xc.07000000001ffffp+14513 missing-errno
+fma 0xb.ffffp-4777 0x8.000000fffffffffp-11612 -0x0.3800fff8p-16385 missing-errno
+fma 0x1.4p-16382 0x1.0000000000000004p-1 0x1p-16384 missing-errno
+fma -0x1.4p-16382 0x1.0000000000000004p-1 -0x1p-16384 missing-errno
+fma 0x1.fffffffffffffff8p-16382 0x1.0000000000000002p-1 0x1p-16445 missing-errno
+fma -0x1.fffffffffffffff8p-16382 0x1.0000000000000002p-1 -0x1p-16445 missing-errno
+fma 0x1p-16445 0x1p-1 0x0.fffffffffffffffep-16382 missing-errno
+fma -0x1p-16445 0x1p-1 -0x0.fffffffffffffffep-16382 missing-errno
+fma 0x1p-16445 0x1.1p-1 0x0.fffffffffffffffep-16382 missing-errno
+fma -0x1p-16445 0x1.1p-1 -0x0.fffffffffffffffep-16382 missing-errno
+fma 0x1p-16445 0x1p-16445 0x1p16383 missing-errno
+fma 0x1p-16445 -0x1p-16445 0x1p16383 missing-errno
+fma 0x1p-16445 0x1p-16445 -0x1p16383 missing-errno
+fma 0x1p-16445 -0x1p-16445 -0x1p16383 missing-errno
+fma 0x1p-16445 0x1p-16445 0x1p-16382 missing-errno
+fma 0x1p-16445 -0x1p-16445 0x1p-16382 missing-errno
+fma 0x1p-16445 0x1p-16445 -0x1p-16382 missing-errno
+fma 0x1p-16445 -0x1p-16445 -0x1p-16382 missing-errno
+fma 0x1p-16445 0x1p-16445 0x0.fffffffffffffffep-16382 missing-errno
+fma 0x1p-16445 -0x1p-16445 0x0.fffffffffffffffep-16382 missing-errno
+fma 0x1p-16445 0x1p-16445 -0x0.fffffffffffffffep-16382 missing-errno
+fma 0x1p-16445 -0x1p-16445 -0x0.fffffffffffffffep-16382 missing-errno
+fma 0x1p-16445 0x1p-16445 0x1p-16445 missing-errno
 fma 0x1p-16445 -0x1p-16445 0x1p-16445 missing-errno
 fma 0x1p-16445 0x1p-16445 -0x1p-16445 missing-errno
-fma 0x1p-16445 -0x1p-16445 -0x1p-16445
+fma 0x1p-16445 -0x1p-16445 -0x1p-16445 missing-errno
 fma 0x0.ffffffffffffffffp0 0x0.ffffffffffffffffp0 -0x0.fffffffffffffffep0
 fma 0x0.ffffffffffffffffp0 -0x0.ffffffffffffffffp0 0x0.fffffffffffffffep0
 fma -0x0.ffffffffffffffffp0 0x0.ffffffffffffffffp0 0x0.fffffffffffffffep0
 fma -0x0.ffffffffffffffffp0 -0x0.ffffffffffffffffp0 -0x0.fffffffffffffffep0
-fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 0x1p16383
-fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 0x1p16383
-fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 -0x1p16383
-fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 -0x1p16383
-fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 0x1p16319
-fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 0x1p16319
-fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 -0x1p16319
-fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 -0x1p16319
-
-fma 0x1.bb2de33e02ccbbfa6e245a7c1f71p-2584 -0x1.6b500daf0580d987f1bc0cadfcddp-13777 0x1.613cd91d9fed34b33820e5ab9d8dp-16378
-fma -0x1.f949b880cacb0f0c61540105321dp-5954 -0x1.3876cec84b4140f3bd6198731b7ep-10525 -0x0.a5dc1c6cfbc498c54fb0b504bf19p-16382
-fma -0x1.0000fffffffffp-16221 0x1.0000001fffff8007fep-239 0x0.ff87ffffffffffffe000003fffffp-16382
-fma -0x1.ac79c9376ef447f3827c9e9de008p-2228 -0x1.5ba830022b6139e21fbe7270cad8p-6314 0x1.e8282b6a26bb6a9daf5c8e73e9f9p-8616
-fma -0x1.c69749ec574caaa2ab8e97ddb9f3p+2652 0x1.f34235ff9d095449c29b4831b62dp+3311 0x1.fbe4302df23354dbd0c4d3cfe606p+5879
-fma -0x1.ca8835fc6ecfb5398625fc891be5p-1686 0x1.621e1972bbe2180e5be9dd7d8df5p-7671 -0x1.7d2d21b73b52cf20dec2a83902a4p-9395
-fma -0x1.55cff679ec49c2541fab41fc843ep-11819 0x1.e60e9f464f9e8df0509647c7c971p+12325 0x1.eaa2a7649d765c2f564f7a5beca7p+454
-fma 0x1.f0e7b1454908576f2537d863cf9bp+11432 0x1.cdce52f09d4ca76e68706f34b5d5p-1417 -0x1.2e986187c70f146235ea2066e486p+9979
-fma 0x1.f102f7da4a57a3a4aab620e29452p-3098 -0x1.cc06a4ff40248f9e2dcc4b6afd84p-11727 0x1.d512a11126b5ac8ed8973b8580c8p-14849
-fma -0x1.fc47ac7434b993cd8dcb2b431f25p-3816 0x1.fbc9750da8468852d84558e1db6dp-5773 -0x1.00a98abf783f75c40fe5b7a37d86p-9607
-fma 0x1.00000000000007ffffffffffffffp-9045 -0x1.ffffffffffff80000001ffffffffp+4773 -0x1.f8p-4316
-fma 0x1.4e922764c90701d4a2f21d01893dp-8683 -0x1.955a12e2d7c9447c27fa022fc865p+212 -0x1.e9634462eaef96528b90b6944578p-8521
-fma 0x1.801181509c03bdbef10d6165588cp-15131 0x1.ad86f8e57d3d40bfa8007780af63p-368 -0x1.6e9df0dab1c9f1d7a6043c390741p-15507
+fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 0x1p16383 missing-errno
+fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 0x1p16383 missing-errno
+fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 -0x1p16383 missing-errno
+fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 -0x1p16383 missing-errno
+fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 0x1p16319 missing-errno
+fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 0x1p16319 missing-errno
+fma 0x1.0000000000000002p-16382 0x1.0000000000000002p-66 -0x1p16319 missing-errno
+fma 0x1.0000000000000002p-16382 -0x1.0000000000000002p-66 -0x1p16319 missing-errno
+
+fma 0x1.bb2de33e02ccbbfa6e245a7c1f71p-2584 -0x1.6b500daf0580d987f1bc0cadfcddp-13777 0x1.613cd91d9fed34b33820e5ab9d8dp-16378 missing-errno
+fma -0x1.f949b880cacb0f0c61540105321dp-5954 -0x1.3876cec84b4140f3bd6198731b7ep-10525 -0x0.a5dc1c6cfbc498c54fb0b504bf19p-16382 missing-errno
+fma -0x1.0000fffffffffp-16221 0x1.0000001fffff8007fep-239 0x0.ff87ffffffffffffe000003fffffp-16382 missing-errno
+fma -0x1.ac79c9376ef447f3827c9e9de008p-2228 -0x1.5ba830022b6139e21fbe7270cad8p-6314 0x1.e8282b6a26bb6a9daf5c8e73e9f9p-8616 missing-errno
+fma -0x1.c69749ec574caaa2ab8e97ddb9f3p+2652 0x1.f34235ff9d095449c29b4831b62dp+3311 0x1.fbe4302df23354dbd0c4d3cfe606p+5879 missing-errno
+fma -0x1.ca8835fc6ecfb5398625fc891be5p-1686 0x1.621e1972bbe2180e5be9dd7d8df5p-7671 -0x1.7d2d21b73b52cf20dec2a83902a4p-9395 missing-errno
+fma -0x1.55cff679ec49c2541fab41fc843ep-11819 0x1.e60e9f464f9e8df0509647c7c971p+12325 0x1.eaa2a7649d765c2f564f7a5beca7p+454 missing-errno
+fma 0x1.f0e7b1454908576f2537d863cf9bp+11432 0x1.cdce52f09d4ca76e68706f34b5d5p-1417 -0x1.2e986187c70f146235ea2066e486p+9979 missing-errno
+fma 0x1.f102f7da4a57a3a4aab620e29452p-3098 -0x1.cc06a4ff40248f9e2dcc4b6afd84p-11727 0x1.d512a11126b5ac8ed8973b8580c8p-14849 missing-errno
+fma -0x1.fc47ac7434b993cd8dcb2b431f25p-3816 0x1.fbc9750da8468852d84558e1db6dp-5773 -0x1.00a98abf783f75c40fe5b7a37d86p-9607 missing-errno
+fma 0x1.00000000000007ffffffffffffffp-9045 -0x1.ffffffffffff80000001ffffffffp+4773 -0x1.f8p-4316 missing-errno
+fma 0x1.4e922764c90701d4a2f21d01893dp-8683 -0x1.955a12e2d7c9447c27fa022fc865p+212 -0x1.e9634462eaef96528b90b6944578p-8521 missing-errno
+fma 0x1.801181509c03bdbef10d6165588cp-15131 0x1.ad86f8e57d3d40bfa8007780af63p-368 -0x1.6e9df0dab1c9f1d7a6043c390741p-15507 missing-errno
 fma 0x1.ffffffffffffffp0 0x1.000000000000008p0 -0x1p-1000
-fma 0x1.4p-16382 0x1.0000000000000000000000000002p-1 0x1p-16384
-fma -0x1.4p-16382 0x1.0000000000000000000000000002p-1 -0x1p-16384
-fma 0x1.fffffffffffffffffffffffffffcp-16382 0x1.0000000000000000000000000001p-1 0x1p-16494
-fma -0x1.fffffffffffffffffffffffffffcp-16382 0x1.0000000000000000000000000001p-1 -0x1p-16494
-fma 0x1p-16494 0x1p-1 0x0.ffffffffffffffffffffffffffffp-16382
-fma -0x1p-16494 0x1p-1 -0x0.ffffffffffffffffffffffffffffp-16382
-fma 0x1p-16494 0x1.1p-1 0x0.ffffffffffffffffffffffffffffp-16382
-fma -0x1p-16494 0x1.1p-1 -0x0.ffffffffffffffffffffffffffffp-16382
-fma 0x1p-16494 0x1p-16494 0x1p16383
-fma 0x1p-16494 -0x1p-16494 0x1p16383
-fma 0x1p-16494 0x1p-16494 -0x1p16383
-fma 0x1p-16494 -0x1p-16494 -0x1p16383
-fma 0x1p-16494 0x1p-16494 0x1p-16382
-fma 0x1p-16494 -0x1p-16494 0x1p-16382
-fma 0x1p-16494 0x1p-16494 -0x1p-16382
-fma 0x1p-16494 -0x1p-16494 -0x1p-16382
-fma 0x1p-16494 0x1p-16494 0x0.ffffffffffffffffffffffffffffp-16382
-fma 0x1p-16494 -0x1p-16494 0x0.ffffffffffffffffffffffffffffp-16382
-fma 0x1p-16494 0x1p-16494 -0x0.ffffffffffffffffffffffffffffp-16382
-fma 0x1p-16494 -0x1p-16494 -0x0.ffffffffffffffffffffffffffffp-16382
-fma 0x1p-16494 0x1p-16494 0x1p-16494
-# Bug 6801: errno setting may be missing.
+fma 0x1.4p-16382 0x1.0000000000000000000000000002p-1 0x1p-16384 missing-errno
+fma -0x1.4p-16382 0x1.0000000000000000000000000002p-1 -0x1p-16384 missing-errno
+fma 0x1.fffffffffffffffffffffffffffcp-16382 0x1.0000000000000000000000000001p-1 0x1p-16494 missing-errno
+fma -0x1.fffffffffffffffffffffffffffcp-16382 0x1.0000000000000000000000000001p-1 -0x1p-16494 missing-errno
+fma 0x1p-16494 0x1p-1 0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma -0x1p-16494 0x1p-1 -0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma 0x1p-16494 0x1.1p-1 0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma -0x1p-16494 0x1.1p-1 -0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma 0x1p-16494 0x1p-16494 0x1p16383 missing-errno
+fma 0x1p-16494 -0x1p-16494 0x1p16383 missing-errno
+fma 0x1p-16494 0x1p-16494 -0x1p16383 missing-errno
+fma 0x1p-16494 -0x1p-16494 -0x1p16383 missing-errno
+fma 0x1p-16494 0x1p-16494 0x1p-16382 missing-errno
+fma 0x1p-16494 -0x1p-16494 0x1p-16382 missing-errno
+fma 0x1p-16494 0x1p-16494 -0x1p-16382 missing-errno
+fma 0x1p-16494 -0x1p-16494 -0x1p-16382 missing-errno
+fma 0x1p-16494 0x1p-16494 0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma 0x1p-16494 -0x1p-16494 0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma 0x1p-16494 0x1p-16494 -0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma 0x1p-16494 -0x1p-16494 -0x0.ffffffffffffffffffffffffffffp-16382 missing-errno
+fma 0x1p-16494 0x1p-16494 0x1p-16494 missing-errno
 fma 0x1p-16494 -0x1p-16494 0x1p-16494 missing-errno
 fma 0x1p-16494 0x1p-16494 -0x1p-16494 missing-errno
-fma 0x1p-16494 -0x1p-16494 -0x1p-16494
-fma 0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffffp0
-fma 0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffffp0
-fma -0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffffp0
-fma -0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffffp0
-fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 0x1p16383
-fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 0x1p16383
-fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 -0x1p16383
-fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 -0x1p16383
-fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 0x1p16319
-fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 0x1p16319
-fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 -0x1p16319
-fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 -0x1p16319
-
-# Bug 6801: errno setting may be missing.
-fma 0x1.fffffep-126 0x1.fffffep25 0x1.fffffep127 missing-errno
+fma 0x1p-16494 -0x1p-16494 -0x1p-16494 missing-errno
+fma 0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffffp0 missing-errno
+fma 0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffffp0 missing-errno
+fma -0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffff8p0 0x0.ffffffffffffffffffffffffffffp0 missing-errno
+fma -0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffff8p0 -0x0.ffffffffffffffffffffffffffffp0 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 0x1p16383 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 0x1p16383 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 -0x1p16383 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 -0x1p16383 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 0x1p16319 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 0x1p16319 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 0x1.0000000000000000000000000001p-66 -0x1p16319 missing-errno
+fma 0x1.0000000000000000000000000001p-16382 -0x1.0000000000000000000000000001p-66 -0x1p16319 missing-errno
+
+fma 0x1.fffffep-126 0x1.fffffep25 0x1.fffffep127 missing-errno xfail-rounding:ibm128-libgcc
 fma 0x1.fffffep-126 -0x1.fffffep25 0x1.fffffep127
 fma 0x1.fffffep-126 0x1.fffffep25 -0x1.fffffep127
-fma 0x1.fffffep-126 -0x1.fffffep25 -0x1.fffffep127 missing-errno
-fma 0x1.fffffffffffffp-1022 0x1.fffffffffffffp54 0x1.fffffffffffffp1023 missing-errno
-fma 0x1.fffffffffffffp-1022 -0x1.fffffffffffffp54 0x1.fffffffffffffp1023
-fma 0x1.fffffffffffffp-1022 0x1.fffffffffffffp54 -0x1.fffffffffffffp1023
-fma 0x1.fffffffffffffp-1022 -0x1.fffffffffffffp54 -0x1.fffffffffffffp1023 missing-errno
+fma 0x1.fffffep-126 -0x1.fffffep25 -0x1.fffffep127 missing-errno xfail-rounding:ibm128-libgcc
+fma 0x1.fffffffffffffp-1022 0x1.fffffffffffffp54 0x1.fffffffffffffp1023 missing-errno xfail-rounding:ibm128-libgcc
+fma 0x1.fffffffffffffp-1022 -0x1.fffffffffffffp54 0x1.fffffffffffffp1023 missing-errno
+fma 0x1.fffffffffffffp-1022 0x1.fffffffffffffp54 -0x1.fffffffffffffp1023 missing-errno
+fma 0x1.fffffffffffffp-1022 -0x1.fffffffffffffp54 -0x1.fffffffffffffp1023 missing-errno xfail-rounding:ibm128-libgcc
 fma 0x1.fffffffffffffffep-16382 0x1.fffffffffffffffep65 0x1.fffffffffffffffep16383 missing-errno
-fma 0x1.fffffffffffffffep-16382 -0x1.fffffffffffffffep65 0x1.fffffffffffffffep16383
-fma 0x1.fffffffffffffffep-16382 0x1.fffffffffffffffep65 -0x1.fffffffffffffffep16383
+fma 0x1.fffffffffffffffep-16382 -0x1.fffffffffffffffep65 0x1.fffffffffffffffep16383 missing-errno
+fma 0x1.fffffffffffffffep-16382 0x1.fffffffffffffffep65 -0x1.fffffffffffffffep16383 missing-errno
 fma 0x1.fffffffffffffffep-16382 -0x1.fffffffffffffffep65 -0x1.fffffffffffffffep16383 missing-errno
 fma 0x1.ffffffffffffffffffffffffffffp-16382 0x1.ffffffffffffffffffffffffffffp114 0x1.ffffffffffffffffffffffffffffp16383 missing-errno
-fma 0x1.ffffffffffffffffffffffffffffp-16382 -0x1.ffffffffffffffffffffffffffffp114 0x1.ffffffffffffffffffffffffffffp16383
-fma 0x1.ffffffffffffffffffffffffffffp-16382 0x1.ffffffffffffffffffffffffffffp114 -0x1.ffffffffffffffffffffffffffffp16383
+fma 0x1.ffffffffffffffffffffffffffffp-16382 -0x1.ffffffffffffffffffffffffffffp114 0x1.ffffffffffffffffffffffffffffp16383 missing-errno
+fma 0x1.ffffffffffffffffffffffffffffp-16382 0x1.ffffffffffffffffffffffffffffp114 -0x1.ffffffffffffffffffffffffffffp16383 missing-errno
 fma 0x1.ffffffffffffffffffffffffffffp-16382 -0x1.ffffffffffffffffffffffffffffp114 -0x1.ffffffffffffffffffffffffffffp16383 missing-errno
 
 hypot 0 0
diff --git a/math/bits/mathcalls-narrow.h b/math/bits/mathcalls-narrow.h
index 287896d769..b6a4ed010c 100644
--- a/math/bits/mathcalls-narrow.h
+++ b/math/bits/mathcalls-narrow.h
@@ -26,6 +26,9 @@  __MATHCALL_NARROW (__MATHCALL_NAME (add), __MATHCALL_REDIR_NAME (add), 2);
 /* Divide.  */
 __MATHCALL_NARROW (__MATHCALL_NAME (div), __MATHCALL_REDIR_NAME (div), 2);
 
+/* Fused multiply-add.  */
+__MATHCALL_NARROW (__MATHCALL_NAME (fma), __MATHCALL_REDIR_NAME2 (fma), 3);
+
 /* Multiply.  */
 __MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2);
 
diff --git a/math/gen-tgmath-tests.py b/math/gen-tgmath-tests.py
index 858fd4c309..6d32a4b6e4 100755
--- a/math/gen-tgmath-tests.py
+++ b/math/gen-tgmath-tests.py
@@ -696,8 +696,8 @@  class Tests(object):
         self.add_tests('fromfpx', 'intmax_t', ['r', 'int', 'unsigned int'])
         self.add_tests('ufromfp', 'uintmax_t', ['r', 'int', 'unsigned int'])
         self.add_tests('ufromfpx', 'uintmax_t', ['r', 'int', 'unsigned int'])
-        for fn, args in (('add', 2), ('div', 2), ('mul', 2), ('sqrt', 1),
-                         ('sub', 2)):
+        for fn, args in (('add', 2), ('div', 2), ('fma', 3), ('mul', 2),
+                         ('sqrt', 1), ('sub', 2)):
             for ret, prefix in (('float', 'f'),
                                 ('double', 'd'),
                                 ('_Float16', 'f16'),
diff --git a/math/libm-test-driver.c b/math/libm-test-driver.c
index ae0b312708..e122f94f7c 100644
--- a/math/libm-test-driver.c
+++ b/math/libm-test-driver.c
@@ -189,6 +189,16 @@  struct test_aa_f_data
     int exceptions;
   } rd, rn, rz, ru;
 };
+struct test_aaa_f_data
+{
+  const char *arg_str;
+  ARG_FLOAT arg1, arg2, arg3;
+  struct
+  {
+    FLOAT expected;
+    int exceptions;
+  } rd, rn, rz, ru;
+};
 #endif
 struct test_fi_f_data
 {
@@ -536,8 +546,8 @@  struct test_Ff_b1_data
 #define RUN_TEST_LOOP_fl_f RUN_TEST_LOOP_2_f
 #define RUN_TEST_if_f RUN_TEST_2_f
 #define RUN_TEST_LOOP_if_f RUN_TEST_LOOP_2_f
-#define RUN_TEST_fff_f(ARG_STR, FUNC_NAME, ARG1, ARG2, ARG3,		\
-		       EXPECTED, EXCEPTIONS)				\
+#define RUN_TEST_3_f(ARG_STR, FUNC_NAME, ARG1, ARG2, ARG3,		\
+		     EXPECTED, EXCEPTIONS)				\
   do									\
     if (enable_test (EXCEPTIONS))					\
       {									\
@@ -547,14 +557,16 @@  struct test_Ff_b1_data
 	COMMON_TEST_CLEANUP;						\
       }									\
   while (0)
-#define RUN_TEST_LOOP_fff_f(FUNC_NAME, ARRAY, ROUNDING_MODE)		\
+#define RUN_TEST_LOOP_3_f(FUNC_NAME, ARRAY, ROUNDING_MODE)		\
   IF_ROUND_INIT_ ## ROUNDING_MODE					\
     for (size_t i = 0; i < sizeof (ARRAY) / sizeof (ARRAY)[0]; i++)	\
-      RUN_TEST_fff_f ((ARRAY)[i].arg_str, FUNC_NAME, (ARRAY)[i].arg1,	\
-		      (ARRAY)[i].arg2, (ARRAY)[i].arg3,			\
-		      (ARRAY)[i].RM_##ROUNDING_MODE.expected,		\
-		      (ARRAY)[i].RM_##ROUNDING_MODE.exceptions);	\
+      RUN_TEST_3_f ((ARRAY)[i].arg_str, FUNC_NAME, (ARRAY)[i].arg1,	\
+		    (ARRAY)[i].arg2, (ARRAY)[i].arg3,			\
+		    (ARRAY)[i].RM_##ROUNDING_MODE.expected,		\
+		    (ARRAY)[i].RM_##ROUNDING_MODE.exceptions);		\
   ROUND_RESTORE_ ## ROUNDING_MODE
+#define RUN_TEST_LOOP_fff_f RUN_TEST_LOOP_3_f
+#define RUN_TEST_LOOP_aaa_f RUN_TEST_LOOP_3_f
 #define RUN_TEST_fiu_M(ARG_STR, FUNC_NAME, ARG1, ARG2, ARG3,		\
 		       EXPECTED, EXCEPTIONS)				\
   do									\
diff --git a/math/libm-test-narrow-fma.inc b/math/libm-test-narrow-fma.inc
new file mode 100644
index 0000000000..9b34c04c9d
--- /dev/null
+++ b/math/libm-test-narrow-fma.inc
@@ -0,0 +1,361 @@ 
+/* Test narrowing fma.
+   Copyright (C) 1997-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 "libm-test-driver.c"
+
+static const struct test_aaa_f_data fma_test_data[] =
+  {
+    TEST_aaa_f (fma, arg_qnan_value, 2.0, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, 2.0, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_snan_value, 2.0, 3.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, -arg_snan_value, 2.0, 3.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 1.0, arg_qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, -arg_qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, arg_snan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 1.0, -arg_snan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 1.0, 2.0, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, 2.0, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, 2.0, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 1.0, 2.0, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_max_value, arg_max_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_max_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_min_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_min_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_min_subnorm_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_min_subnorm_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_max_value, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_max_value, arg_max_value, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_min_value, arg_min_value, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_min_value, arg_min_value, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_min_subnorm_value, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_min_subnorm_value, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_qnan_value, arg_qnan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_qnan_value, arg_qnan_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_qnan_value, -arg_qnan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_qnan_value, -arg_qnan_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, arg_qnan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, arg_qnan_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, -arg_qnan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, -arg_qnan_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_snan_value, arg_qnan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_qnan_value, arg_snan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_qnan_value, arg_qnan_value, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_snan_value, arg_snan_value, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 1.0, arg_qnan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, arg_qnan_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, -arg_qnan_value, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, -arg_qnan_value, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 1.0, arg_snan_value, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_qnan_value, 2.0, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_qnan_value, 2.0, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, 2.0, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, 2.0, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_snan_value, 2.0, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_qnan_value, arg_qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_qnan_value, -arg_qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, arg_qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_qnan_value, -arg_qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_snan_value, arg_snan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_plus_infty, 0.0, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, arg_plus_infty, 0.0, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, arg_minus_infty, 0.0, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, arg_minus_infty, 0.0, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, arg_plus_infty, 0.0, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_plus_infty, 0.0, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_minus_infty, 0.0, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_minus_infty, 0.0, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 0.0, arg_plus_infty, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, 0.0, arg_plus_infty, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, 0.0, arg_minus_infty, arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, 0.0, arg_minus_infty, -arg_qnan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION_OK),
+    TEST_aaa_f (fma, 0.0, arg_plus_infty, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 0.0, arg_plus_infty, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 0.0, arg_minus_infty, arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 0.0, arg_minus_infty, -arg_snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    /* Bug 6801: errno setting may be missing.  */
+    TEST_aaa_f (fma, arg_plus_infty, 0.0, 1.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_minus_infty, 0.0, 1.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 0.0, arg_plus_infty, 1.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, 0.0, arg_minus_infty, 1.0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, arg_minus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, arg_plus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, arg_plus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, arg_minus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_plus_infty, 3.5L, arg_minus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_minus_infty, -7.5L, arg_minus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, -13.5L, arg_plus_infty, arg_plus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+    TEST_aaa_f (fma, arg_minus_infty, 7.5L, arg_plus_infty, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
+
+    TEST_aaa_f (fma, -arg_max_value, -arg_max_value, arg_minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_max_value / 2, arg_max_value / 2, arg_minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_max_value, arg_plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_max_value / 2, -arg_max_value / 4, arg_plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, 4, arg_plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, 2, arg_minus_infty, arg_minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, arg_plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, arg_plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, arg_minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, arg_minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_plus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_minus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_plus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_minus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_max_value, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_value, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, arg_min_subnorm_value, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_max_value, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_value, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_plus_infty, -arg_min_subnorm_value, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_max_value, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_value, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, arg_min_subnorm_value, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_max_value, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_value, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_minus_infty, -arg_min_subnorm_value, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_max_value, arg_plus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_value, arg_plus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_plus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_max_value, arg_plus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_value, arg_plus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_plus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_max_value, arg_minus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_value, arg_minus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, arg_plus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, arg_minus_zero, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, -arg_min_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, -arg_min_subnorm_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, arg_min_subnorm_value, arg_minus_infty, -arg_max_value, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_max_value, arg_minus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_value, arg_minus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, arg_plus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, arg_minus_zero, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, -arg_min_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, -arg_min_subnorm_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+    TEST_aaa_f (fma, -arg_min_subnorm_value, arg_minus_infty, -arg_max_value, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_ROUNDING_IBM128_LIBGCC),
+
+    AUTO_TESTS_aaa_f (fma),
+  };
+
+static void
+fma_test (void)
+{
+  ALL_RM_TEST (fma, 1, fma_test_data, RUN_TEST_LOOP_aaa_f, END);
+}
+
+static void
+do_test (void)
+{
+  fma_test ();
+}
+
+/*
+ * Local Variables:
+ * mode:c
+ * End:
+ */
diff --git a/math/math-narrow.h b/math/math-narrow.h
index 0194f8c97e..fee00f12df 100644
--- a/math/math-narrow.h
+++ b/math/math-narrow.h
@@ -342,4 +342,57 @@ 
     }						\
   while (0)
 
+/* Check for error conditions from a narrowing fused multiply-add
+   function returning RET with arguments X, Y and Z and set errno as
+   needed.  Checking for error conditions for fma (either narrowing or
+   not) and setting errno is not currently implemented.  See bug
+   6801.  */
+#define CHECK_NARROW_FMA(RET, X, Y, Z)		\
+  do						\
+    {						\
+    }						\
+  while (0)
+
+/* Implement narrowing fused multiply-add using round-to-odd.  The
+   arguments are X, Y and Z, the return type is TYPE and UNION,
+   MANTISSA, SUFFIX and CLEAR_UNDERFLOW are as for ROUND_TO_ODD.  */
+#define NARROW_FMA_ROUND_TO_ODD(X, Y, Z, TYPE, UNION, SUFFIX, MANTISSA, \
+				CLEAR_UNDERFLOW)			\
+  do									\
+    {									\
+      typeof (X) tmp;							\
+      TYPE ret;								\
+									\
+      tmp = ROUND_TO_ODD (fma ## SUFFIX (math_opt_barrier (X), (Y),	\
+					 (Z)),				\
+			  UNION, SUFFIX, MANTISSA, CLEAR_UNDERFLOW);	\
+      /* If the round-to-odd result is zero, the result is an exact	\
+	 zero and must be recomputed in the original rounding mode.  */ \
+      if (tmp == 0)							\
+	ret = (TYPE) (math_opt_barrier (X) * (Y) + (Z));		\
+      else								\
+	ret = (TYPE) tmp;						\
+									\
+      CHECK_NARROW_FMA (ret, (X), (Y), (Z));				\
+      return ret;							\
+    }									\
+  while (0)
+
+/* Implement a narrowing fused multiply-add function where no attempt
+   is made to be correctly rounding (this only applies to IBM long
+   double; the case where the function is not actually narrowing is
+   handled by aliasing other fma functions in libm, not using this
+   macro).  The arguments are X, Y and Z and the return type is
+   TYPE.  */
+#define NARROW_FMA_TRIVIAL(X, Y, Z, TYPE, SUFFIX)	\
+  do							\
+    {							\
+      TYPE ret;						\
+							\
+      ret = (TYPE) (fma ## SUFFIX ((X), (Y), (Z)));	\
+      CHECK_NARROW_FMA (ret, (X), (Y), (Z));		\
+      return ret;					\
+    }							\
+  while (0)
+
 #endif /* math-narrow.h.  */
diff --git a/math/s_fma.c b/math/s_fma.c
index 2dc5c5d2cb..33ec7d1300 100644
--- a/math/s_fma.c
+++ b/math/s_fma.c
@@ -17,8 +17,13 @@ 
    <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 <libm-alias-double.h>
+#include <math-narrow-alias.h>
 
 double
 __fma (double x, double y, double z)
@@ -27,4 +32,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/math/s_fmal.c b/math/s_fmal.c
index 47a68ed235..bac664ab4a 100644
--- a/math/s_fmal.c
+++ b/math/s_fmal.c
@@ -17,8 +17,11 @@ 
    <https://www.gnu.org/licenses/>.  */
 
 #define NO_MATH_REDIRECT
+#define f64xfmaf128 __hide_f64xfmaf128
 #include <math.h>
+#undef f64xfmaf128
 #include <libm-alias-ldouble.h>
+#include <math-narrow-alias.h>
 
 long double
 __fmal (long double x, long double y, long double z)
@@ -26,3 +29,4 @@  __fmal (long double x, long double y, long double z)
   return (x * y) + z;
 }
 libm_alias_ldouble (__fma, fma)
+libm_alias_ldouble_narrow (__fma, fma)
diff --git a/math/tgmath.h b/math/tgmath.h
index 5f19cf4821..5fdc7982b2 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -57,15 +57,21 @@ 
   (F ## l (X))
 # define __TGMATH_2_NARROW_D(F, X, Y)		\
   (F ## l (X, Y))
+# define __TGMATH_3_NARROW_D(F, X, Y, Z)	\
+  (F ## l (X, Y, Z))
 # define __TGMATH_1_NARROW_F64X(F, X)		\
   (F ## f128 (X))
 # define __TGMATH_2_NARROW_F64X(F, X, Y)	\
   (F ## f128 (X, Y))
+# define __TGMATH_3_NARROW_F64X(F, X, Y, Z)	\
+  (F ## f128 (X, Y, Z))
 # if !__HAVE_FLOAT128
 #  define __TGMATH_1_NARROW_F32X(F, X)		\
   (F ## f64 (X))
 #  define __TGMATH_2_NARROW_F32X(F, X, Y)	\
   (F ## f64 (X, Y))
+#  define __TGMATH_3_NARROW_F32X(F, X, Y, Z)	\
+  (F ## f64 (X, Y, Z))
 # endif
 
 # if __HAVE_BUILTIN_TGMATH
@@ -137,23 +143,33 @@ 
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X))
 #  define __TGMATH_2_NARROW_F(F, X, Y)				\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X), (Y))
+#  define __TGMATH_3_NARROW_F(F, X, Y, Z)			\
+  __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X), (Y), (Z))
 #  define __TGMATH_1_NARROW_F16(F, X)				\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X))
 #  define __TGMATH_2_NARROW_F16(F, X, Y)			\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X), (Y))
+#  define __TGMATH_3_NARROW_F16(F, X, Y, Z)				\
+  __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X), (Y), (Z))
 #  define __TGMATH_1_NARROW_F32(F, X)				\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X))
 #  define __TGMATH_2_NARROW_F32(F, X, Y)			\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X), (Y))
+#  define __TGMATH_3_NARROW_F32(F, X, Y, Z)				\
+  __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X), (Y), (Z))
 #  define __TGMATH_1_NARROW_F64(F, X)				\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X))
 #  define __TGMATH_2_NARROW_F64(F, X, Y)			\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y))
+#  define __TGMATH_3_NARROW_F64(F, X, Y, Z)				\
+  __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y), (Z))
 #  if __HAVE_FLOAT128
 #   define __TGMATH_1_NARROW_F32X(F, X)				\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X))
 #   define __TGMATH_2_NARROW_F32X(F, X, Y)			\
   __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X), (Y))
+#   define __TGMATH_3_NARROW_F32X(F, X, Y, Z)				\
+  __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X), (Y), (Z))
 #  endif
 
 # else /* !__HAVE_BUILTIN_TGMATH.  */
@@ -565,6 +581,12 @@ 
 			  + (__tgmath_real_type (Y)) 0) > sizeof (double) \
 		  ? F ## l (X, Y)					\
 		  : F (X, Y)))
+#  define __TGMATH_3_NARROW_F(F, X, Y, Z)				\
+  (__extension__ (sizeof ((__tgmath_real_type (X)) 0			\
+			  + (__tgmath_real_type (Y)) 0			\
+			  + (__tgmath_real_type (Z)) 0) > sizeof (double) \
+		  ? F ## l (X, Y, Z)					\
+		  : F (X, Y, Z)))
 /* In most cases, these narrowing macro definitions based on sizeof
    ensure that the function called has the right argument format, as
    for other <tgmath.h> macros for compilers before GCC 8, but may not
@@ -594,6 +616,13 @@ 
 		  ? __TGMATH_F128 ((X) + (Y), F, (X, Y))		\
 		  F ## f64x (X, Y)					\
 		  : F ## f64 (X, Y)))
+#   define __TGMATH_3_NARROW_F32(F, X, Y, Z)				\
+  (__extension__ (sizeof ((__tgmath_real_type (X)) 0			\
+			  + (__tgmath_real_type (Y)) 0			\
+			  + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
+		  ? __TGMATH_F128 ((X) + (Y) + (Z), F, (X, Y, Z))	\
+		  F ## f64x (X, Y, Z)					\
+		  : F ## f64 (X, Y, Z)))
 #   define __TGMATH_1_NARROW_F64(F, X)					\
   (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
 		  ? __TGMATH_F128 ((X), F, (X))				\
@@ -605,6 +634,13 @@ 
 		  ? __TGMATH_F128 ((X) + (Y), F, (X, Y))		\
 		  F ## f64x (X, Y)					\
 		  : F ## f128 (X, Y)))
+#   define __TGMATH_3_NARROW_F64(F, X, Y, Z)				\
+  (__extension__ (sizeof ((__tgmath_real_type (X)) 0			\
+			  + (__tgmath_real_type (Y)) 0			\
+			  + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
+		  ? __TGMATH_F128 ((X) + (Y) + (Z), F, (X, Y, Z))	\
+		  F ## f64x (X, Y, Z)					\
+		  : F ## f128 (X, Y, Z)))
 #   define __TGMATH_1_NARROW_F32X(F, X)					\
   (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
 		  ? __TGMATH_F128 ((X), F, (X))				\
@@ -616,6 +652,13 @@ 
 		  ? __TGMATH_F128 ((X) + (Y), F, (X, Y))		\
 		  F ## f64x (X, Y)					\
 		  : F ## f64 (X, Y)))
+#   define __TGMATH_3_NARROW_F32X(F, X, Y, Z)				\
+  (__extension__ (sizeof ((__tgmath_real_type (X)) 0			\
+			  + (__tgmath_real_type (Y)) 0			\
+			  + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
+		  ? __TGMATH_F128 ((X) + (Y) + (Z), F, (X, Y, Z))	\
+		  F ## f64x (X, Y, Z)					\
+		  : F ## f64 (X, Y, Z)))
 #  elif __HAVE_FLOAT128
 #   define __TGMATH_1_NARROW_F32(F, X)					\
   (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
@@ -626,10 +669,18 @@ 
 			  + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
 		  ? F ## f128 (X, Y)					\
 		  : F ## f64 (X, Y)))
+#   define __TGMATH_3_NARROW_F32(F, X, Y, Z)				\
+  (__extension__ (sizeof ((__tgmath_real_type (X)) 0			\
+			  + (__tgmath_real_type (Y)) 0			\
+			  + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
+		  ? F ## f128 (X, Y, Z)					\
+		  : F ## f64 (X, Y, Z)))
 #   define __TGMATH_1_NARROW_F64(F, X)		\
   (F ## f128 (X))
 #   define __TGMATH_2_NARROW_F64(F, X, Y)	\
   (F ## f128 (X, Y))
+#   define __TGMATH_3_NARROW_F64(F, X, Y, Z)	\
+  (F ## f128 (X, Y, Z))
 #   define __TGMATH_1_NARROW_F32X(F, X)					\
   (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float32x) \
 		  ? F ## f64x (X)					\
@@ -639,11 +690,19 @@ 
 			  + (__tgmath_real_type (Y)) 0) > sizeof (_Float32x) \
 		  ? F ## f64x (X, Y)					\
 		  : F ## f64 (X, Y)))
+#   define __TGMATH_3_NARROW_F32X(F, X, Y, Z)				\
+  (__extension__ (sizeof ((__tgmath_real_type (X)) 0			\
+			  + (__tgmath_real_type (Y)) 0			\
+			  + (__tgmath_real_type (Z)) 0) > sizeof (_Float32x) \
+		  ? F ## f64x (X, Y, Z)					\
+		  : F ## f64 (X, Y, Z)))
 #  else
 #   define __TGMATH_1_NARROW_F32(F, X)		\
   (F ## f64 (X))
 #   define __TGMATH_2_NARROW_F32(F, X, Y)	\
   (F ## f64 (X, Y))
+#   define __TGMATH_3_NARROW_F32(F, X, Y, Z)	\
+  (F ## f64 (X, Y, Z))
 #  endif
 # endif /* !__HAVE_BUILTIN_TGMATH.  */
 #else
@@ -916,6 +975,10 @@ 
 # define fsqrt(Val) __TGMATH_1_NARROW_F (fsqrt, Val)
 # define dsqrt(Val) __TGMATH_1_NARROW_D (dsqrt, Val)
 
+/* Fused multiply-add.  */
+# define ffma(Val1, Val2, Val3) __TGMATH_3_NARROW_F (ffma, Val1, Val2, Val3)
+# define dfma(Val1, Val2, Val3) __TGMATH_3_NARROW_D (dfma, Val1, Val2, Val3)
+
 #endif
 
 #if __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -926,6 +989,8 @@ 
 #  define f16mul(Val1, Val2) __TGMATH_2_NARROW_F16 (f16mul, Val1, Val2)
 #  define f16sub(Val1, Val2) __TGMATH_2_NARROW_F16 (f16sub, Val1, Val2)
 #  define f16sqrt(Val) __TGMATH_1_NARROW_F16 (f16sqrt, Val)
+#  define f16fma(Val1, Val2, Val3)			\
+  __TGMATH_3_NARROW_F16 (f16fma, Val1, Val2, Val3)
 # endif
 
 # if __HAVE_FLOAT32
@@ -934,6 +999,8 @@ 
 #  define f32mul(Val1, Val2) __TGMATH_2_NARROW_F32 (f32mul, Val1, Val2)
 #  define f32sub(Val1, Val2) __TGMATH_2_NARROW_F32 (f32sub, Val1, Val2)
 #  define f32sqrt(Val) __TGMATH_1_NARROW_F32 (f32sqrt, Val)
+#  define f32fma(Val1, Val2, Val3)			\
+  __TGMATH_3_NARROW_F32 (f32fma, Val1, Val2, Val3)
 # endif
 
 # if __HAVE_FLOAT64 && (__HAVE_FLOAT64X || __HAVE_FLOAT128)
@@ -942,6 +1009,8 @@ 
 #  define f64mul(Val1, Val2) __TGMATH_2_NARROW_F64 (f64mul, Val1, Val2)
 #  define f64sub(Val1, Val2) __TGMATH_2_NARROW_F64 (f64sub, Val1, Val2)
 #  define f64sqrt(Val) __TGMATH_1_NARROW_F64 (f64sqrt, Val)
+#  define f64fma(Val1, Val2, Val3)			\
+  __TGMATH_3_NARROW_F64 (f64fma, Val1, Val2, Val3)
 # endif
 
 # if __HAVE_FLOAT32X
@@ -950,6 +1019,8 @@ 
 #  define f32xmul(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xmul, Val1, Val2)
 #  define f32xsub(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xsub, Val1, Val2)
 #  define f32xsqrt(Val) __TGMATH_1_NARROW_F32X (f32xsqrt, Val)
+#  define f32xfma(Val1, Val2, Val3)			\
+  __TGMATH_3_NARROW_F32X (f32xfma, Val1, Val2, Val3)
 # endif
 
 # if __HAVE_FLOAT64X && (__HAVE_FLOAT128X || __HAVE_FLOAT128)
@@ -958,6 +1029,8 @@ 
 #  define f64xmul(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xmul, Val1, Val2)
 #  define f64xsub(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xsub, Val1, Val2)
 #  define f64xsqrt(Val) __TGMATH_1_NARROW_F64X (f64xsqrt, Val)
+#  define f64xfma(Val1, Val2, Val3)			\
+  __TGMATH_3_NARROW_F64X (f64xfma, Val1, Val2, Val3)
 # endif
 
 #endif
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