From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7891) id 2932638582BC; Tue, 29 Nov 2022 08:00:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2932638582BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669708848; bh=1i423uEYxxTJW0WHLt+skD1MMuM5cqA+GosNj3GfilA=; h=From:To:Subject:Date:From; b=wNp0J4275RnjnGbcOKkDhrFRn4LLFJn7955UYmVVMMXUosb55gQIR6i1pkHZFyEQ3 BzLyKC86ykqDGwlgajsxVvrCI9WoltGl67ltU5vJWNb1wIkY2QVd/Ht2JQvxcmcnt9 UnehKs0V8CMUL5+Ustzdneixzp7YUEY0/K+tJCuQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Yinyu Cai To: glibc-cvs@sourceware.org Subject: [glibc] LoongArch: Use __builtin_rint{,f} with GCC >= 13 X-Act-Checkin: glibc X-Git-Author: Xi Ruoyao X-Git-Refname: refs/heads/master X-Git-Oldrev: f704192911c6c7b65a54beab3ab369fca7609a5d X-Git-Newrev: 948652e4f82f5aedbe882178ae158990bde63c79 Message-Id: <20221129080048.2932638582BC@sourceware.org> Date: Tue, 29 Nov 2022 08:00:48 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=948652e4f82f5aedbe882178ae158990bde63c79 commit 948652e4f82f5aedbe882178ae158990bde63c79 Author: Xi Ruoyao Date: Wed Nov 23 11:44:55 2022 +0800 LoongArch: Use __builtin_rint{,f} with GCC >= 13 GCC 13 compiles these built-ins to frint.{d,s} instruction. Link: https://gcc.gnu.org/r13-3919 Diff: --- sysdeps/loongarch/fpu/math-use-builtins-rint.h | 9 +++++++++ 1 file changed, 9 insertions(+) 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