about 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:58 +0800
committercaiyinyu <caiyinyu@loongson.cn>2022-11-29 16:00:28 +0800
commita1981ecbfd4aec84dea26936d91c8ed9164f8b13 (patch)
treed78cf6c9ba6e1b931c8ad01c9844c9665651175c /sysdeps/generic
parente1697a540c49d5bd35e84b22fcd537c14f71a4e9 (diff)
downloadglibc-a1981ecbfd4aec84dea26936d91c8ed9164f8b13.tar.gz
glibc-a1981ecbfd4aec84dea26936d91c8ed9164f8b13.tar.xz
glibc-a1981ecbfd4aec84dea26936d91c8ed9164f8b13.zip
Use GCC builtins for llrint functions if desired.
This patch is using the corresponding GCC builtin for llrintf, llrint,
llrintl and llrintf128 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-llrint.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-llrint.h b/sysdeps/generic/math-use-builtins-llrint.h
new file mode 100644
index 0000000000..ced6a327a1
--- /dev/null
+++ b/sysdeps/generic/math-use-builtins-llrint.h
@@ -0,0 +1,4 @@
+#define USE_LLRINT_BUILTIN 0
+#define USE_LLRINTF_BUILTIN 0
+#define USE_LLRINTL_BUILTIN 0
+#define USE_LLRINTF128_BUILTIN 0
diff --git a/sysdeps/generic/math-use-builtins.h b/sysdeps/generic/math-use-builtins.h
index 3acec1d538..dddeaa4ea8 100644
--- a/sysdeps/generic/math-use-builtins.h
+++ b/sysdeps/generic/math-use-builtins.h
@@ -38,5 +38,6 @@
 #include <math-use-builtins-fmin.h>
 #include <math-use-builtins-fabs.h>
 #include <math-use-builtins-lrint.h>
+#include <math-use-builtins-llrint.h>
 
 #endif /* MATH_USE_BUILTINS_H  */