diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-11-23 11:44:55 +0800 |
---|---|---|
committer | caiyinyu <caiyinyu@loongson.cn> | 2022-11-29 16:00:28 +0800 |
commit | 948652e4f82f5aedbe882178ae158990bde63c79 (patch) | |
tree | a0f99997a6695904ce7d9394d7feee605036e584 /sysdeps/loongarch/fpu | |
parent | f704192911c6c7b65a54beab3ab369fca7609a5d (diff) | |
download | glibc-948652e4f82f5aedbe882178ae158990bde63c79.tar.gz glibc-948652e4f82f5aedbe882178ae158990bde63c79.tar.xz glibc-948652e4f82f5aedbe882178ae158990bde63c79.zip |
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
Diffstat (limited to 'sysdeps/loongarch/fpu')
-rw-r--r-- | sysdeps/loongarch/fpu/math-use-builtins-rint.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 |