| Age | Commit message (Collapse) | Author |
|
only using POSIX make syntax and semantics
|
|
According to the documentation, 32-bit x86 builds do not have the
64-bit _BitScan{Forward,Reverse}64 intrinsics.
|
|
|
|
Given these, we can remove the code to check for the zero case.
|
|
This patch includes an intrinsic implementation for these functions
when the compiler is GCC, Clang, or MSVC--or if the compiler claims
to be one of those. Otherwise, a naive implementation is used.
Tests are included for all of these functions, which turned up a
possible problem: according to the gcc documentation, __builtin_ctz
and __builtin_clz give an undefined result when their inputs is
zero. I was not able to persuade myself that we always called them
with a nonzero argument.
|