Use bitwise test instead of __builtin_popcount
__builtin_popcount might not be available on all compilers, so using
it requires a configure check and fallback implementation. In fact
on gcc without an -march flag, it gets compiled to a function call to
libgcc. However, we only need to test whether multiple bits are set,
and this can be done easily with a bitwise and.
Signed-off-by:
Michael Forney <mforney@mforney.org>
Showing
Please register or sign in to comment