unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xiaolin Tang <tangxiaolin@loongson.cn>
To: adhemerval.zanella@linaro.org, libc-alpha@sourceware.org,
	caiyinyu@loongson.cn, xry111@xry111.site
Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn
Subject: [PATCH 1/9] LoongArch: Use __builtin_rint{,f} with GCC >= 13
Date: Fri, 18 Nov 2022 19:29:04 +0800	[thread overview]
Message-ID: <20221118112912.2501774-2-tangxiaolin@loongson.cn> (raw)
In-Reply-To: <20221118112912.2501774-1-tangxiaolin@loongson.cn>

From: Xi Ruoyao <xry111@xry111.site>

GCC 13 compiles these built-ins to frint.{d,s} instruction.

Link: https://gcc.gnu.org/r13-3919
---
 sysdeps/loongarch/fpu/math-use-builtins-rint.h | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-rint.h

diff --git a/sysdeps/loongarch/fpu/math-use-builtins-rint.h b/sysdeps/loongarch/fpu/math-use-builtins-rint.h
new file mode 100644
index 0000000000..cd91482f5f
--- /dev/null
+++ b/sysdeps/loongarch/fpu/math-use-builtins-rint.h
@@ -0,0 +1,9 @@
+#if __GNUC_PREREQ (13, 0)
+#  define USE_RINT_BUILTIN 1
+#  define USE_RINTF_BUILTIN 1
+#else
+#  define USE_RINT_BUILTIN 0
+#  define USE_RINTF_BUILTIN 0
+#endif
+#define USE_RINTL_BUILTIN 0
+#define USE_RINTF128_BUILTIN 0
-- 
2.20.1


  reply	other threads:[~2022-11-18 11:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 11:29 [PATCH 0/9] LoongArch: Use builtins with GCC >= 13 Xiaolin Tang
2022-11-18 11:29 ` Xiaolin Tang [this message]
2022-11-18 11:29 ` [PATCH 2/9] Use GCC builtins for lrint functions if desired Xiaolin Tang
2022-11-18 11:29 ` [PATCH 3/9] LoongArch: Use __builtin_lrint{,f} with GCC >= 13 Xiaolin Tang
2022-11-18 11:29 ` [PATCH 4/9] Use GCC builtins for llrint functions if desired Xiaolin Tang
2022-11-18 11:29 ` [PATCH 5/9] LoongArch: Use __builtin_llrint{,f} with GCC >= 13 Xiaolin Tang
2022-11-18 11:29 ` [PATCH 6/9] Use GCC builtins for logb functions if desired Xiaolin Tang
2022-11-18 11:29 ` [PATCH 7/9] LoongArch: Use __builtin_logb{,f} with GCC >= 13 Xiaolin Tang
2022-11-22 16:20 ` [PATCH 0/9] LoongArch: Use builtins " Xi Ruoyao via Libc-alpha
2022-11-23  2:14   ` tangxiaolin
2022-11-23  2:55   ` tangxiaolin
2022-11-23  3:18     ` Xi Ruoyao via Libc-alpha
  -- strict thread matches above, loose matches on Subject: below --
2022-11-18 11:30 [PATCH 1/9] LoongArch: Use __builtin_rint{,f} " Xiaolin Tang
2022-11-23  2:38 [PATCH 0/9] LoongArch: Use builtins " Xiaolin Tang
2022-11-23  2:38 ` [PATCH 1/9] LoongArch: Use __builtin_rint{,f} " Xiaolin Tang

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221118112912.2501774-2-tangxiaolin@loongson.cn \
    --to=tangxiaolin@loongson.cn \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=chenglulu@loongson.cn \
    --cc=libc-alpha@sourceware.org \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /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).