git: 37bd3aa6fac8 - main - amd64: use builtins for all ffs* variants
Mateusz Guzik
mjg at FreeBSD.org
Thu Jan 14 14:37:47 UTC 2021
The branch main has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8
commit 37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8
Author: Mateusz Guzik <mjg at FreeBSD.org>
AuthorDate: 2021-01-14 12:33:24 +0000
Commit: Mateusz Guzik <mjg at FreeBSD.org>
CommitDate: 2021-01-14 14:37:22 +0000
amd64: use builtins for all ffs* variants
While here even up whitespace.
---
sys/amd64/include/cpufunc.h | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index 2bf2339c7d6e..763ed2c64c8a 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -160,24 +160,13 @@ enable_intr(void)
#ifdef _KERNEL
#define HAVE_INLINE_FFS
-#define ffs(x) __builtin_ffs(x)
+#define ffs(x) __builtin_ffs(x)
#define HAVE_INLINE_FFSL
-
-static __inline __pure2 int
-ffsl(long mask)
-{
-
- return (__builtin_ffsl(mask));
-}
+#define ffsl(x) __builtin_ffsl(x)
#define HAVE_INLINE_FFSLL
-
-static __inline __pure2 int
-ffsll(long long mask)
-{
- return (ffsl((long)mask));
-}
+#define ffsll(x) __builtin_ffsll(x)
#define HAVE_INLINE_FLS
More information about the dev-commits-src-all
mailing list