amd64: use builtins for all ffs* variants

While here even up whitespace.
This commit is contained in:
Mateusz Guzik 2021-01-14 12:33:24 +00:00
parent cc3c34859e
commit 37bd3aa6fa

View File

@ -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