about summary refs log tree commit diff
path: root/sysdeps/powerpc/math-use-builtins-ffs.h
diff options
context:
space:
mode:
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>2023-08-25 13:30:58 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-01 09:31:33 -0300
commitae4b8d6a0e0dc502e3d8307474a2e5691b7434da (patch)
tree8e8d958ebb90b9edec3847a53364edb32a2314a3 /sysdeps/powerpc/math-use-builtins-ffs.h
parent26d01172f5c3f3b912ecf21ebb911eb5351bba4d (diff)
downloadglibc-ae4b8d6a0e0dc502e3d8307474a2e5691b7434da.tar.gz
glibc-ae4b8d6a0e0dc502e3d8307474a2e5691b7434da.tar.xz
glibc-ae4b8d6a0e0dc502e3d8307474a2e5691b7434da.zip
string: Use builtins for ffs and ffsll
It allows to remove a lot of arch-specific implementations.

Checked on x86_64, aarch64, powerpc64.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/powerpc/math-use-builtins-ffs.h')
-rw-r--r--sysdeps/powerpc/math-use-builtins-ffs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/powerpc/math-use-builtins-ffs.h b/sysdeps/powerpc/math-use-builtins-ffs.h
new file mode 100644
index 0000000000..7b1d401823
--- /dev/null
+++ b/sysdeps/powerpc/math-use-builtins-ffs.h
@@ -0,0 +1,6 @@
+#define USE_FFS_BUILTIN    1
+#ifdef __powerpc64__
+# define USE_FFSLL_BUILTIN 1
+#else
+# define USE_FFSLL_BUILTIN 0
+#endif