aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2022-11-23 11:44:55 +0800
committercaiyinyu <caiyinyu@loongson.cn>2022-11-29 16:00:28 +0800
commit948652e4f82f5aedbe882178ae158990bde63c79 (patch)
treea0f99997a6695904ce7d9394d7feee605036e584 /sysdeps
parentf704192911c6c7b65a54beab3ab369fca7609a5d (diff)
downloadglibc-948652e4f82f5aedbe882178ae158990bde63c79.tar
glibc-948652e4f82f5aedbe882178ae158990bde63c79.tar.gz
glibc-948652e4f82f5aedbe882178ae158990bde63c79.tar.bz2
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')
-rw-r--r--sysdeps/loongarch/fpu/math-use-builtins-rint.h9
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