Bug 1480577 - add AArch64-specific cases for MathUtils.h bitscan functionality; r=Waldo
authorNathan Froyd <froydnj@mozilla.com>
Fri, 03 Aug 2018 18:07:34 -0400
changeset 430097 f293d2face23fddef0e1d43dff4cbf2e3a98e828
parent 430096 88c19779b62620c97710a54a262d3f905284b6b1
child 430098 023e8e5e6fb2d72617bab83fb24c45e492f517f2
push id34383
push usernerli@mozilla.com
push dateSat, 04 Aug 2018 12:28:43 +0000
treeherdermozilla-central@4146a5857135 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1480577
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1480577 - add AArch64-specific cases for MathUtils.h bitscan functionality; r=Waldo
mfbt/MathAlgorithms.h
--- a/mfbt/MathAlgorithms.h
+++ b/mfbt/MathAlgorithms.h
@@ -142,23 +142,23 @@ inline long double
 Abs<long double>(const long double aLongDouble)
 {
   return std::fabs(aLongDouble);
 }
 
 } // namespace mozilla
 
 #if defined(_MSC_VER) && \
-    (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64))
+    (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || defined(_M_ARM64))
 #  define MOZ_BITSCAN_WINDOWS
 
 #  include <intrin.h>
 #  pragma intrinsic(_BitScanForward, _BitScanReverse)
 
-#  if defined(_M_AMD64) || defined(_M_X64)
+#  if defined(_M_AMD64) || defined(_M_X64) || defined(_M_ARM64)
 #    define MOZ_BITSCAN_WINDOWS64
 #   pragma intrinsic(_BitScanForward64, _BitScanReverse64)
 #  endif
 
 #endif
 
 namespace mozilla {