Blame SOURCES/mozjs17-aarch64.patch

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