Skip to content

Commit

Permalink
bit_util: Add fls_ functions; "find last set".
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davidtgoldblatt committed Jul 30, 2020
1 parent 1ed0288 commit 22da836
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 133 deletions.
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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])])
Expand Down
Loading

0 comments on commit 22da836

Please sign in to comment.