Bug 1257441 - Remove arm detection for WinCE using MSVS. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 09 May 2016 10:40:06 +0900
changeset 335930 92ba89f2d72e6bf6996e2adfe556372f5676d2f6
parent 335929 d6c7ebc1417b9d27f75b57834a672ac8b9008163
child 335931 756948b3ac0f03a360d739ee5f54ad05d77d2386
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1257441
milestone49.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 1257441 - Remove arm detection for WinCE using MSVS. r=glandium arm.h still have CPU feature detection for Microsoft Compiler that is used by WinCE. Since we don't have the target for WinCE, we should remove it. Also, even if you need it for Win32/arm that is Windows Mobile and Windows IOT in feature, this is unnecessary. Win32/arm ABI requires thumb2+NEON at least. MozReview-Commit-ID: 6dYjIRY0Suo
mozglue/build/arm.cpp
mozglue/build/arm.h
--- a/mozglue/build/arm.cpp
+++ b/mozglue/build/arm.cpp
@@ -8,106 +8,17 @@
 
 #if defined(MOZILLA_ARM_HAVE_CPUID_DETECTION)
 
 // arm.h has parallel #ifs which declare MOZILLA_ARM_HAVE_CPUID_DETECTION.
 // We don't check it here so that we get compile errors if it's defined, but
 // we don't compile one of these detection methods. The detection code here is
 // based on the CPU detection in libtheora.
 
-#  if defined(_MSC_VER)
-//For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.
-#    define WIN32_LEAN_AND_MEAN
-#    define WIN32_EXTRA_LEAN
-#    include <windows.h>
-
-#    if !defined(MOZILLA_PRESUME_EDSP)
-static bool
-check_edsp(void)
-{
-#      if defined(MOZILLA_MAY_SUPPORT_EDSP)
-  __try
-  {
-    //PLD [r13]
-    __emit(0xF5DDF000);
-    return true;
-  }
-  __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION)
-  {
-    //Ignore exception.
-  }
-#      endif
-  return false;
-}
-#    endif // !MOZILLA_PRESUME_EDSP
-
-#    if !defined(MOZILLA_PRESUME_ARMV6)
-static bool
-check_armv6(void)
-{
-#      if defined(MOZILLA_MAY_SUPPORT_ARMV6)
-  __try
-  {
-    //SHADD8 r3,r3,r3
-    __emit(0xE6333F93);
-    return true;
-  }
-  __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION)
-  {
-    //Ignore exception.
-  }
-#      endif
-  return false;
-}
-#    endif // !MOZILLA_PRESUME_ARMV6
-
-#    if !defined(MOZILLA_PRESUME_ARMV7)
-static bool
-check_armv7(void)
-{
-#      if defined(MOZILLA_MAY_SUPPORT_ARMV7)
-  __try
-  {
-    // ARMv7 DMB (Data Memory Barrier) for stores (DMB.ST)
-    // The Data Memory Barrier existed before ARMv7 as a
-    // cp15 operation, but ARMv7 introduced a dedicated
-    // instruction, DMB.
-    emit(0xF57FF05E);
-    return true;
-  }
-  __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION)
-  {
-    //Ignore exception.
-  }
-#      endif
-  return false;
-}
-#    endif // !MOZILLA_PRESUME_ARMV7
-
-#    if !defined(MOZILLA_PRESUME_NEON)
-static bool
-check_neon(void)
-{
-#      if defined(MOZILLA_MAY_SUPPORT_NEON)
-  __try
-  {
-    //VORR q0,q0,q0
-    __emit(0xF2200150);
-    return true;
-  }
-  __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION)
-  {
-    //Ignore exception.
-  }
-#      endif
-  return false;
-}
-#    endif // !MOZILLA_PRESUME_NEON
-
-#  elif defined(__linux__) || defined(ANDROID)
+#  if defined(__linux__) || defined(ANDROID)
 #    include <stdio.h>
 #    include <stdlib.h>
 #    include <string.h>
 
 enum{
   MOZILLA_HAS_EDSP_FLAG=1,
   MOZILLA_HAS_ARMV6_FLAG=2,
   MOZILLA_HAS_ARMV7_FLAG=4,
--- a/mozglue/build/arm.h
+++ b/mozglue/build/arm.h
@@ -75,33 +75,16 @@
 #    define MOZILLA_PRESUME_NEON 1
 #  endif
 
   // Currently we only have CPU detection for Linux via /proc/cpuinfo
 #  if defined(__linux__) || defined(ANDROID)
 #    define MOZILLA_ARM_HAVE_CPUID_DETECTION 1
 #  endif
 
-#elif defined(_MSC_VER) && defined(_M_ARM)
-
-#  define MOZILLA_ARM_HAVE_CPUID_DETECTION 1
-  // _M_ARM on MSVC has current cpu architecture.
-#  define MOZILLA_ARM_ARCH _M_ARM
-
-  // MSVC only allows external asm for ARM, so we don't have to rely on
-  // compiler support.
-#  define MOZILLA_MAY_SUPPORT_EDSP 1
-#  if defined(HAVE_ARM_SIMD)
-#    define MOZILLA_MAY_SUPPORT_ARMV6 1
-#    define MOZILLA_MAY_SUPPORT_ARMV7 1
-#  endif
-#  if defined(HAVE_ARM_NEON)
-#    define MOZILLA_MAY_SUPPORT_NEON 1
-#  endif
-
 #endif
 
 namespace mozilla {
 
   namespace arm_private {
 #if defined(MOZILLA_ARM_HAVE_CPUID_DETECTION)
 #if !defined(MOZILLA_PRESUME_EDSP)
     extern bool MFBT_DATA edsp_enabled;