Blame SOURCES/mozjs17-aarch64.patch

f27401
diff --git a/js/src/assembler/jit/ExecutableAllocator.h b/js/src/assembler/jit/ExecutableAllocator.h
f27401
index c071c33..90764c3 100644
f27401
--- a/js/src/assembler/jit/ExecutableAllocator.h
f27401
+++ b/js/src/assembler/jit/ExecutableAllocator.h
f27401
@@ -382,6 +382,12 @@ public:
f27401
     {
f27401
         reprotectRegion(start, size, Executable);
f27401
     }
f27401
+#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX
f27401
+    static void cacheFlush(void* code, size_t size)
f27401
+    {
f27401
+        intptr_t end = reinterpret_cast<intptr_t>(code) + size;
f27401
+        __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end));
f27401
+    }
f27401
 #else
f27401
     static void makeWritable(void*, size_t) {}
f27401
     static void makeExecutable(void*, size_t) {}
f27401
diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
f27401
index 0c84896..e8763a7 100644
f27401
--- a/js/src/assembler/wtf/Platform.h
f27401
+++ b/js/src/assembler/wtf/Platform.h
f27401
@@ -325,6 +325,10 @@
f27401
 #define WTF_THUMB_ARCH_VERSION 0
f27401
 #endif
f27401
 
f27401
+/* CPU(AArch64) - 64-bit ARM */
f27401
+#if defined(__aarch64__)
f27401
+#define WTF_CPU_AARCH64 1
f27401
+#endif
f27401
 
f27401
 /* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */
f27401
 /* On ARMv5 and below the natural alignment is required. 
f27401
diff --git a/js/src/configure.in b/js/src/configure.in
f27401
index 15605b2..19fd704 100644
f27401
--- a/js/src/configure.in
f27401
+++ b/js/src/configure.in
f27401
@@ -1121,6 +1121,10 @@ arm*)
f27401
     CPU_ARCH=arm
f27401
     ;;
f27401
 
f27401
+aarch64)
f27401
+    CPU_ARCH=aarch64
f27401
+    ;;
f27401
+
f27401
 mips|mipsel)
f27401
     CPU_ARCH="mips"
f27401
     ;;
f27401
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
f27401
index 0eec2d9..fe26dab 100644
f27401
--- a/mfbt/double-conversion/utils.h
f27401
+++ b/mfbt/double-conversion/utils.h
f27401
@@ -58,6 +58,7 @@
f27401
     defined(__mips__) || defined(__powerpc__) || \
f27401
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
f27401
     defined(__SH4__) || defined(__alpha__) || \
f27401
+    defined(__aarch64__) || \
f27401
     defined(_MIPS_ARCH_MIPS32R2)
f27401
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
f27401
 #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)