From: Xi Ruoyao Date: Wed, 23 Nov 2022 03:44:55 +0000 (+0800) Subject: LoongArch: Use __builtin_rint{,f} with GCC >= 13 X-Git-Tag: glibc-2.37~142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=948652e4f82f5aedbe882178ae158990bde63c79;p=thirdparty%2Fglibc.git 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 --git a/sysdeps/loongarch/fpu/math-use-builtins-rint.h b/sysdeps/loongarch/fpu/math-use-builtins-rint.h new file mode 100644 index 00000000000..cd91482f5f9 --- /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