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
--- 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)