cc6dfd5d67
The existing non-builtin implementation is returning wrong results. For example, given the value 63 as a uint8_t it returns 38 (should be 6). The new implementation follows the naive algorithm presented in figure 5-1 in Hacker's Delight section 5-1. Note that the algorithm in the book is designed for 32 bit numbers, so we extended it to support 64 bit as well. Bug: chromium:1056170 Change-Id: I8fed9c449f80b01b8cc93d339529c0e1e0863fc0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2199345 Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#67801} |
||
---|---|---|
.. | ||
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 | ||
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 |