From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 3/4] powerpc64le: refactor fmaf128
Date: Mon, 4 May 2020 17:23:52 -0500 [thread overview]
Message-ID: <5c075c3c7211661595f66463f992475efbeac8c4.1588628261.git.murphyp@linux.vnet.ibm.com> (raw)
In-Reply-To: <e3158cb2e97968716d0bdb75ff0d0b8f0c51c299.1588628261.git.murphyp@linux.vnet.ibm.com>
Use the compiler hint to determine if this can be inlined. This should
work for any supported GCC which inlines fma. Likewise, it prepares
for a more generic multiarch _Float128 implementation of libm.
---
.../powerpc64/le/fpu/multiarch/s_fmaf128-power9.c | 2 +-
.../powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c | 2 +-
.../powerpc64/le/{power9 => }/fpu/s_fmaf128.c | 13 ++++++++++---
3 files changed, 12 insertions(+), 5 deletions(-)
rename sysdeps/powerpc/powerpc64/le/{power9 => }/fpu/s_fmaf128.c (89%)
diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c
index 8df77ceade..98d4107429 100644
--- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c
+++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c
@@ -23,4 +23,4 @@
#define __fmaf128 __fmaf128_power9
-#include <sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c>
+#include <sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c>
diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c
index ab0c4d03a8..405e287ff3 100644
--- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c
@@ -23,4 +23,4 @@
#define __fmaf128 __fmaf128_ppc64
-#include <sysdeps/ieee754/float128/s_fmaf128.c>
+#include <sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c>
diff --git a/sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c b/sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c
similarity index 89%
rename from sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c
rename to sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c
index f02e810fb9..e0173fff4e 100644
--- a/sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c
+++ b/sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c
@@ -25,12 +25,19 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifdef __FP_FAST_FMAF128
+#include <float128_private.h>
#include <libm-alias-float128.h>
-__float128
-__fmaf128 (__float128 x, __float128 y, __float128 z)
+_Float128
+__fmaf128 (_Float128 x, _Float128 y, _Float128 z)
{
return x * y + z;
}
-
libm_alias_float128 (__fma, fma)
+
+#else
+
+#include <sysdeps/ieee754/float128/s_fmaf128.c>
+
+#endif
--
2.21.1
next prev parent reply other threads:[~2020-05-04 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 22:23 [PATCH 1/4] ldbl-128: refactor nexttoward alias using new macro Paul E. Murphy
2020-05-04 22:23 ` [PATCH 2/4] powerpc64le: refactor e_sqrtf128.c Paul E. Murphy
2020-05-04 22:23 ` Paul E. Murphy [this message]
2020-05-04 22:23 ` [PATCH 4/4] powerpc64le: ifunc (almost) all *f128 routines in multiarch mode Paul E. Murphy
2020-05-05 0:07 ` Joseph Myers
2020-05-05 7:07 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c075c3c7211661595f66463f992475efbeac8c4.1588628261.git.murphyp@linux.vnet.ibm.com \
--to=murphyp@linux.vnet.ibm.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).