Title: [232264] trunk/Source/WTF
- Revision
- 232264
- Author
- [email protected]
- Date
- 2018-05-29 10:56:47 -0700 (Tue, 29 May 2018)
Log Message
Unreviewed, follow-up after r232244
https://bugs.webkit.org/show_bug.cgi?id=186023
_BitScanReverse64 is available only in X86_64 and ARM.
* wtf/MathExtras.h:
(WTF::clz64):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (232263 => 232264)
--- trunk/Source/WTF/ChangeLog 2018-05-29 17:31:16 UTC (rev 232263)
+++ trunk/Source/WTF/ChangeLog 2018-05-29 17:56:47 UTC (rev 232264)
@@ -1,3 +1,13 @@
+2018-05-29 Yusuke Suzuki <[email protected]>
+
+ Unreviewed, follow-up after r232244
+ https://bugs.webkit.org/show_bug.cgi?id=186023
+
+ _BitScanReverse64 is available only in X86_64 and ARM.
+
+ * wtf/MathExtras.h:
+ (WTF::clz64):
+
2018-05-27 Yusuke Suzuki <[email protected]>
[WTF] Add clz32 / clz64 for MSVC
Modified: trunk/Source/WTF/wtf/MathExtras.h (232263 => 232264)
--- trunk/Source/WTF/wtf/MathExtras.h 2018-05-29 17:31:16 UTC (rev 232263)
+++ trunk/Source/WTF/wtf/MathExtras.h 2018-05-29 17:56:47 UTC (rev 232264)
@@ -555,9 +555,10 @@
if (number)
return __builtin_clzll(number);
return 64;
-#elif COMPILER(MSVC)
+#elif COMPILER(MSVC) && !CPU(X86)
// Visual Studio 2008 or upper have __lzcnt, but we can't detect Intel AVX at compile time.
// So we use bit-scan-reverse operation to calculate clz.
+ // _BitScanReverse64 is defined in X86_64 and ARM in MSVC supported environments.
unsigned long ret = 0;
if (_BitScanReverse64(&ret, number))
return 63 - ret;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes