fa056cd088
{WhichPowerOf2} is basically the same as {CountTrailingZeros}, with a restriction to powers of two. Since it does not use or depend on any v8 internals, it can be moved to src/base/bits.h. This CL also changes the implementation to use the CTZ builtin if available, and falls back to popcnt otherwise. Drive-by: Make it constexpr, and rename to {WhichPowerOfTwo}. R=sigurds@chromium.org Bug: v8:9810, v8:8912 Change-Id: I8368d098f9ab1247f3b9f036f1385a38de10cc6a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903966 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#64851} |
||
---|---|---|
.. | ||
platform | ||
utils | ||
address-region-unittest.cc | ||
atomic-utils-unittest.cc | ||
bits-unittest.cc | ||
cpu-unittest.cc | ||
division-by-constant-unittest.cc | ||
flags-unittest.cc | ||
functional-unittest.cc | ||
ieee754-unittest.cc | ||
iterator-unittest.cc | ||
list-unittest.cc | ||
logging-unittest.cc | ||
macros-unittest.cc | ||
ostreams-unittest.cc | ||
region-allocator-unittest.cc | ||
sys-info-unittest.cc | ||
template-utils-unittest.cc | ||
threaded-list-unittest.cc | ||
vlq-base64-unittest.cc |