Blame SOURCES/mozjs17-aarch64.patch

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