bit_util: Add fls_ functions; "find last set".

These simplify a lot of the bit_util module, which had grown bits and pieces of
this functionality across a variety of places over the years.

While we're here, kill off BIT_UTIL_INLINE and don't do reentrancy testing for
bit_util.
This commit is contained in:
David Goldblatt 2020-07-22 07:10:06 -07:00 committed by David Goldblatt
parent 1ed0288d9c
commit 22da836094
3 changed files with 292 additions and 133 deletions

View file

@ -2118,7 +2118,7 @@ esac
fi
dnl ============================================================================
dnl Check for __builtin_clz() and __builtin_clzl().
dnl Check for __builtin_clz(), __builtin_clzl(), and __builtin_clzll().
AC_CACHE_CHECK([for __builtin_clz],
[je_cv_builtin_clz],
@ -2132,6 +2132,10 @@ AC_CACHE_CHECK([for __builtin_clz],
unsigned long x = 0;
int y = __builtin_clzl(x);
}
{
unsigned long long x = 0;
int y = __builtin_clzll(x);
}
])],
[je_cv_builtin_clz=yes],
[je_cv_builtin_clz=no])])