summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorXiaolin Tang <tangxiaolin@loongson.cn>2022-11-23 11:44:56 +0800
committercaiyinyu <caiyinyu@loongson.cn>2022-11-29 16:00:28 +0800
commit2b23ab1feab5a59bcc1931666663b2a8eac3fdbc (patch)
tree037d70b1f7a836854162a9f86c2ed62a834130c7 /sysdeps/generic
parent948652e4f82f5aedbe882178ae158990bde63c79 (diff)
downloadglibc-2b23ab1feab5a59bcc1931666663b2a8eac3fdbc.tar.gz
glibc-2b23ab1feab5a59bcc1931666663b2a8eac3fdbc.tar.xz
glibc-2b23ab1feab5a59bcc1931666663b2a8eac3fdbc.zip
Use GCC builtins for lrint functions if desired.
This patch is using the corresponding GCC builtin for lrintf, lrint,
lrintl and lrintf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins-function.h.

Co-Authored-By: Xi Ruoyao <xry111@xry111.site>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/math-use-builtins-lrint.h4
-rw-r--r--sysdeps/generic/math-use-builtins.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/generic/math-use-builtins-lrint.h b/sysdeps/generic/math-use-builtins-lrint.h
new file mode 100644
index 0000000000..e80418be9e
--- /dev/null
+++ b/sysdeps/generic/math-use-builtins-lrint.h
@@ -0,0 +1,4 @@
+#define USE_LRINT_BUILTIN 0
+#define USE_LRINTF_BUILTIN 0
+#define USE_LRINTL_BUILTIN 0
+#define USE_LRINTF128_BUILTIN 0
diff --git a/sysdeps/generic/math-use-builtins.h b/sysdeps/generic/math-use-builtins.h
index 6bd424d900..3acec1d538 100644
--- a/sysdeps/generic/math-use-builtins.h
+++ b/sysdeps/generic/math-use-builtins.h
@@ -37,5 +37,6 @@
 #include <math-use-builtins-fmax.h>
 #include <math-use-builtins-fmin.h>
 #include <math-use-builtins-fabs.h>
+#include <math-use-builtins-lrint.h>
 
 #endif /* MATH_USE_BUILTINS_H  */