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,
	Xiaolin Tang <tangxiaolin@loongson.cn>
Subject: [PATCH v2 05/10] LoongArch: Use __builtin_llrint{,f} with GCC >= 13
Date: Wed, 23 Nov 2022 11:44:59 +0800	[thread overview]
Message-ID: <20221123034504.1249579-6-tangxiaolin@loongson.cn> (raw)
In-Reply-To: <20221123034504.1249579-1-tangxiaolin@loongson.cn>

GCC 13 compiles these built-ins instead of generic
implementation for function llrint.

Link: https://gcc.gnu.org/r13-3920
Co-Authored-By: Xi Ruoyao <xry111@xry111.site>
---
 sysdeps/loongarch/fpu/math-use-builtins-llrint.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-llrint.h

diff --git a/sysdeps/loongarch/fpu/math-use-builtins-llrint.h b/sysdeps/loongarch/fpu/math-use-builtins-llrint.h
new file mode 100644
index 0000000000..bee5910b09
--- /dev/null
+++ b/sysdeps/loongarch/fpu/math-use-builtins-llrint.h
@@ -0,0 +1,10 @@
+#if __GNUC_PREREQ (13, 0)
+# define USE_LLRINT_BUILTIN 1
+# define USE_LLRINTF_BUILTIN 1
+#else
+# define USE_LLRINT_BUILTIN 0
+# define USE_LLRINTF_BUILTIN 0
+#endif
+
+#define USE_LLRINTL_BUILTIN 0
+#define USE_LLRINTF128_BUILTIN 0
-- 
2.31.1


  parent reply	other threads:[~2022-11-23  3:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23  3:44 [PATCH v2 00/10] LoongArch: Use builtins with GCC >= 13 Xiaolin Tang
2022-11-23  3:44 ` [PATCH v2 01/10] LoongArch: Use __builtin_rint{,f} " Xiaolin Tang
2022-11-23  3:44 ` [PATCH v2 02/10] Use GCC builtins for lrint functions if desired Xiaolin Tang
2022-11-23  3:44 ` [PATCH v2 03/10] LoongArch: Use __builtin_lrint{,f} with GCC >= 13 Xiaolin Tang
2022-11-23  3:44 ` [PATCH v2 04/10] Use GCC builtins for llrint functions if desired Xiaolin Tang
2022-11-23  3:44 ` Xiaolin Tang [this message]
2022-11-23  3:45 ` [PATCH v2 06/10] Use GCC builtins for logb " Xiaolin Tang
2022-11-23  3:45 ` [PATCH v2 07/10] LoongArch: Use __builtin_logb{,f} with GCC >= 13 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=20221123034504.1249579-6-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).