public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: libc-alpha@sourceware.org
Cc: "YunQiang Su" <syq@gcc.gnu.org>,
	"Adhemerval Zanella" <adhemerval.zanella@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [COMMITTED] MIPSr6/math: Use builtin fma and fmaf
Date: Mon, 24 Jun 2024 19:45:11 +0200	[thread overview]
Message-ID: <20240624174605.17406-1-dilfridge@gentoo.org> (raw)
In-Reply-To: <CAKcpw6XZcbhcyLA53FYiH=+J-tD2X8yOXPmpYRTzJcj8ZitFag@mail.gmail.com>

From: YunQiang Su <syq@gcc.gnu.org>

MIPSr6 has MADDF.s/MADDF.d instructions, which are fused.

In MIPS ISA, double support can be subsetted.  Only FMAF is enabled
for this case.

	* sysdeps/mips/fpu/math-use-builtins-fma.h

Signed-off-by: YunQiang Su <syq@gcc.gnu.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 sysdeps/mips/fpu/math-use-builtins-fma.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 sysdeps/mips/fpu/math-use-builtins-fma.h

diff --git a/sysdeps/mips/fpu/math-use-builtins-fma.h b/sysdeps/mips/fpu/math-use-builtins-fma.h
new file mode 100644
index 0000000000..af8c1f95ff
--- /dev/null
+++ b/sysdeps/mips/fpu/math-use-builtins-fma.h
@@ -0,0 +1,13 @@
+#if __mips_isa_rev >= 6
+# ifdef __mips_single_float
+#  define USE_FMA_BUILTIN 0
+# else
+#  define USE_FMA_BUILTIN 1
+# endif
+# define USE_FMAF_BUILTIN 1
+#else
+# define USE_FMA_BUILTIN 0
+# define USE_FMAF_BUILTIN 0
+#endif
+#define USE_FMAL_BUILTIN 0
+#define USE_FMAF128_BUILTIN 0
-- 
2.44.2


  reply	other threads:[~2024-06-24 17:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04  1:31 [PATCH v3] " YunQiang Su
2024-06-04 18:00 ` Adhemerval Zanella Netto
2024-06-05 15:15   ` Maciej W. Rozycki
2024-06-05 15:26     ` YunQiang Su
2024-06-08 14:17       ` Maciej W. Rozycki
2024-06-09  6:43         ` YunQiang Su
2024-06-14 12:42           ` Adhemerval Zanella Netto
2024-06-14 13:06           ` Maciej W. Rozycki
2024-06-14  1:35   ` YunQiang Su
2024-06-24 17:45     ` Andreas K. Hüttel [this message]
2024-06-24 22:55       ` [COMMITTED] " Maciej W. Rozycki
2024-06-24 22:57         ` Andreas K. Huettel
2024-06-24 23:08         ` [REVERT] Revert "MIPSr6/math: Use builtin fma and fmaf" Andreas K. Hüttel
2024-06-06  7:07 ` [PATCH v3] MIPSr6/math: Use builtin fma and fmaf Philippe Mathieu-Daudé

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=20240624174605.17406-1-dilfridge@gentoo.org \
    --to=dilfridge@gentoo.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=philmd@linaro.org \
    --cc=syq@gcc.gnu.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).