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:45:00 +0800
committercaiyinyu <caiyinyu@loongson.cn>2022-11-29 16:00:28 +0800
commit2e2485ce05bce85bf092ba0752854afa14b92dad (patch)
tree4138377bc399d8368b1e838941f12889ff4c8495 /sysdeps/generic
parentf711e4ef53990b6c76f2dfdbcb9f791c541cdac3 (diff)
downloadglibc-2e2485ce05bce85bf092ba0752854afa14b92dad.tar.gz
glibc-2e2485ce05bce85bf092ba0752854afa14b92dad.tar.xz
glibc-2e2485ce05bce85bf092ba0752854afa14b92dad.zip
Use GCC builtins for logb functions if desired.
This patch is using the corresponding GCC builtin for logbf, logb,
logbl and logbf128 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-logb.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-logb.h b/sysdeps/generic/math-use-builtins-logb.h
new file mode 100644
index 0000000000..e816a7e0a1
--- /dev/null
+++ b/sysdeps/generic/math-use-builtins-logb.h
@@ -0,0 +1,4 @@
+#define USE_LOGB_BUILTIN 0
+#define USE_LOGBF_BUILTIN 0
+#define USE_LOGBL_BUILTIN 0
+#define USE_LOGBF128_BUILTIN 0
diff --git a/sysdeps/generic/math-use-builtins.h b/sysdeps/generic/math-use-builtins.h
index dddeaa4ea8..c59612a878 100644
--- a/sysdeps/generic/math-use-builtins.h
+++ b/sysdeps/generic/math-use-builtins.h
@@ -39,5 +39,6 @@
 #include <math-use-builtins-fabs.h>
 #include <math-use-builtins-lrint.h>
 #include <math-use-builtins-llrint.h>
+#include <math-use-builtins-logb.h>
 
 #endif /* MATH_USE_BUILTINS_H  */