Date: Thu, 14 Jan 2021 14:37:46 GMT From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 37bd3aa6fac8 - main - amd64: use builtins for all ffs* variants Message-ID: <202101141437.10EEbkBx055101@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8 commit 37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-01-14 12:33:24 +0000 Commit: Mateusz Guzik <mjg@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101141437.10EEbkBx055101>