[Webkit-unassigned] [Bug 174232] Reimplement bmalloc::log2 for MSVC
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 6 19:13:04 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=174232
Yusuke Suzuki <utatane.tea at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |utatane.tea at gmail.com
--- Comment #2 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Comment on attachment 314788
--> https://bugs.webkit.org/attachment.cgi?id=314788
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=314788&action=review
> Source/bmalloc/bmalloc/Algorithm.h:137
> - return bitCount<unsigned long>() - 1 - __builtin_clzl(value);
> + return value < 2 ? 0 : 1 + log2(value / 2);
We should keep the current efficient log2 for non-Windows environment.
If this is not constexpr, in Windows, you can use _BitScanReverse64 / _BitScanReverse. But maybe they are not constexpr.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170707/a5670491/attachment.html>
More information about the webkit-unassigned
mailing list