public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: YunQiang Su <syq@gcc.gnu.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 1/6] MIPSr6/math: Use builtin fma and fmaf
Date: Mon, 13 May 2024 16:14:24 +0800	[thread overview]
Message-ID: <20240513081429.1749898-2-syq@gcc.gnu.org> (raw)
In-Reply-To: <20240513081429.1749898-1-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>
---
 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..6e296fd4c0
--- /dev/null
+++ b/sysdeps/mips/fpu/math-use-builtins-fma.h
@@ -0,0 +1,13 @@
+#if __mips_isa_rev >= 6
+#  if defined(__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.39.2


  reply	other threads:[~2024-05-13  8:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13  8:14 [PATCH 0/6] MIPS: Improve math YunQiang Su
2024-05-13  8:14 ` YunQiang Su [this message]
2024-05-22 13:42   ` [PATCH 1/6] MIPSr6/math: Use builtin fma and fmaf Adhemerval Zanella Netto
2024-05-25 11:55     ` YunQiang Su
2024-05-31 15:53       ` YunQiang Su
2024-05-13  8:14 ` [PATCH 2/6] MIPS/math: Define port-specific GET_HIGH_WORD YunQiang Su
2024-05-22 18:36   ` Adhemerval Zanella Netto
2024-05-13  8:14 ` [PATCH 3/6] MIPS/math: Implement optimized issignaling(f) YunQiang Su
2024-05-23 14:37   ` Adhemerval Zanella Netto
2024-05-13  8:14 ` [PATCH 4/6] MIPS/math: Implement optimized fmaximum/fminmum(,_mag)(,f) YunQiang Su
2024-05-13  8:14 ` [PATCH 5/6] MIPS/math: Implement optimized fmax(mag)(f)/fmin(mag)(f) YunQiang Su
2024-05-13  8:14 ` [PATCH 6/6] MIPS/math: Implement optimized f(max,min)imum(_mag)_num(f) YunQiang Su
2024-05-22 13:21 ` [PATCH 0/6] MIPS: Improve math YunQiang Su

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=20240513081429.1749898-2-syq@gcc.gnu.org \
    --to=syq@gcc.gnu.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).