about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-opt
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-opt')
-rw-r--r--sysdeps/ieee754/ldbl-opt/Makefile4
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-dfma.c28
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-ffma.c28
3 files changed, 59 insertions, 1 deletions
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);
+}