Bug 1360429 - Part 2. Detect __ARM_NEON macro for aarch64. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 28 Apr 2017 13:27:10 +0900
changeset 406280 edea8382d3f45ed2fdd38c42f210a63c139f3be2
parent 406279 44e7fc73aeb508c0a363319ec48a5db4b175bb9b
child 406281 942071ef8ff7adbc9a2cc3d9d8a06aebfff941d2
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1360429
milestone55.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 1360429 - Part 2. Detect __ARM_NEON macro for aarch64. r=glandium aarch64's gcc and arm's gcc with -mfpu=neon defines __ARM_NEON for NEON, so we should detect it to support NEON code. MozReview-Commit-ID: LRMTQLctuLV
mozglue/build/arm.h
--- a/mozglue/build/arm.h
+++ b/mozglue/build/arm.h
@@ -64,29 +64,29 @@
 #      define MOZILLA_MAY_SUPPORT_NEON 1
 #    endif
 
 #    if defined(HAVE_ARM_SIMD)
 #      define MOZILLA_MAY_SUPPORT_ARMV7 1
 #    endif
 #  endif
 
-  // When using -mfpu=neon, gcc generates neon instructions.
-
-#  if defined(__ARM_NEON__)
-#    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
 
 #endif
 
+// When using -mfpu=neon on arm gcc, or using default on aarch64,
+// the compiler generates neon instructions.
+#if defined(__ARM_NEON)
+#  define MOZILLA_PRESUME_NEON 1
+#endif
+
 namespace mozilla {
 
   namespace arm_private {
 #if defined(MOZILLA_ARM_HAVE_CPUID_DETECTION)
 #if !defined(MOZILLA_PRESUME_EDSP)
     extern bool MFBT_DATA edsp_enabled;
 #endif
 #if !defined(MOZILLA_PRESUME_ARMV6)