public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 03/13] s390x: Use fma{f} builtin
Date: Tue,  9 Jun 2020 18:32:51 -0300	[thread overview]
Message-ID: <20200609213301.3591135-3-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20200609213301.3591135-1-adhemerval.zanella@linaro.org>

Checked on s390x-linux-gnu.
---
 sysdeps/s390/fpu/math-use-builtins-fma.h |  4 +++
 sysdeps/s390/fpu/s_fma.c                 | 32 ------------------------
 sysdeps/s390/fpu/s_fmaf.c                | 32 ------------------------
 3 files changed, 4 insertions(+), 64 deletions(-)
 create mode 100644 sysdeps/s390/fpu/math-use-builtins-fma.h
 delete mode 100644 sysdeps/s390/fpu/s_fma.c
 delete mode 100644 sysdeps/s390/fpu/s_fmaf.c

diff --git a/sysdeps/s390/fpu/math-use-builtins-fma.h b/sysdeps/s390/fpu/math-use-builtins-fma.h
new file mode 100644
index 0000000000..eede75aa41
--- /dev/null
+++ b/sysdeps/s390/fpu/math-use-builtins-fma.h
@@ -0,0 +1,4 @@
+#define USE_FMA_BUILTIN 1
+#define USE_FMAF_BUILTIN 1
+#define USE_FMAL_BUILTIN 0
+#define USE_FMAF128_BUILTIN 0
diff --git a/sysdeps/s390/fpu/s_fma.c b/sysdeps/s390/fpu/s_fma.c
deleted file mode 100644
index ae924d05e8..0000000000
--- a/sysdeps/s390/fpu/s_fma.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Compute x * y + z as ternary operation.  S/390 version.
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
-
-   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 <libm-alias-double.h>
-
-double
-__fma (double x, double y, double z)
-{
-  double r;
-  __asm__ ("madbr %0,%1,%2" : "=f" (r) : "%f" (x), "fR" (y), "0" (z));
-  return r;
-}
-#ifndef __fma
-libm_alias_double (__fma, fma)
-#endif
diff --git a/sysdeps/s390/fpu/s_fmaf.c b/sysdeps/s390/fpu/s_fmaf.c
deleted file mode 100644
index 9e5bc533b8..0000000000
--- a/sysdeps/s390/fpu/s_fmaf.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Compute x * y + z as ternary operation.  S/390 version.
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
-
-   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 <libm-alias-float.h>
-
-float
-__fmaf (float x, float y, float z)
-{
-  float r;
-  __asm__ ("maebr %0,%1,%2" : "=f" (r) : "%f" (x), "fR" (y), "0" (z));
-  return r;
-}
-#ifndef __fmaf
-libm_alias_float (__fma, fma)
-#endif
-- 
2.25.1


  parent reply	other threads:[~2020-06-09 21:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 21:32 [PATCH 01/13] math: Decompose math-use-builtins.h Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 02/13] aarch64: Use math-use-builtins for ceil{f} Adhemerval Zanella
2020-06-10 10:15   ` Szabolcs Nagy
2020-06-09 21:32 ` Adhemerval Zanella [this message]
2020-06-16 10:13   ` [PATCH 03/13] s390x: Use fma{f} builtin Stefan Liebler
2020-06-09 21:32 ` [PATCH 04/13] powerpc: Use sqrt{f} builtin Adhemerval Zanella
2020-06-10 14:22   ` Paul A. Clarke
2020-06-09 21:32 ` [PATCH 05/13] x86_64: Use builtin sqrt{f,l} Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 06/13] i386: Use builtin sqrtl Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 07/13] alpha: Use builtin sqrt{f} Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 08/13] mips: Use sqrt{f} builtin Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 09/13] sparc: " Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 10/13] s390: " Adhemerval Zanella
2020-06-10 15:39   ` Stefan Liebler
2020-06-10 15:45     ` Szabolcs Nagy
2020-06-10 15:59       ` Adhemerval Zanella
2020-06-16 10:13         ` Stefan Liebler
2020-06-09 21:32 ` [PATCH 11/13] riscv: " Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:33 ` [PATCH 12/13] arm: " Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:33 ` [PATCH 13/13] m68k: Use sqrt{f} builtin for coldfire Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-16 10:13 ` [PATCH 01/13] math: Decompose math-use-builtins.h Stefan Liebler

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=20200609213301.3591135-3-adhemerval.zanella@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --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).