Bug 1480592 - add aarch64 windows support; r=kaie
authorNathan Froyd <froydnj@mozilla.com>
Wed, 22 Aug 2018 13:55:21 +0200
changeset 4792 34274ae8c85e825f6949972748dc50eb50a48720
parent 4791 6e31156d700294ba50ab7bd5d761a480f7663581
child 4793 098415a64f86e6dd98a2afb915526b1bfaf55409
push id300
push userkaie@kuix.de
push dateWed, 22 Aug 2018 11:54:19 +0000
reviewerskaie
bugs1480592
Bug 1480592 - add aarch64 windows support; r=kaie
configure.in
pr/include/md/_win95.cfg
pr/include/md/_win95.h
--- a/configure.in
+++ b/configure.in
@@ -2101,16 +2101,20 @@ tools are selected during the Xcode/Deve
                 CFLAGS="$CFLAGS -arch:IA32"
             fi
 	fi
         ;;
     x86_64)
 	    AC_DEFINE(_AMD64_)
 	    USE_64=1
 	    ;;
+    aarch64)
+	    AC_DEFINE(_ARM64_)
+	    USE_64=1
+	    ;;
     ia64)
 	    AC_DEFINE(_IA64_)
 	    USE_64=1
 	    ;;
     *)
 	    AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
 	    ;;
     esac
--- a/pr/include/md/_win95.cfg
+++ b/pr/include/md/_win95.cfg
@@ -209,16 +209,65 @@
 #define PR_ALIGN_OF_WORD    4
 #define PR_ALIGN_OF_DWORD   8
 #define PR_ALIGN_OF_DOUBLE  8
 #define PR_ALIGN_OF_POINTER 4
 
 #define PR_BYTES_PER_WORD_LOG2  2
 #define PR_BYTES_PER_DWORD_LOG2 3
 
+#elif defined(_M_ARM64) || defined(_ARM64_)
+
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+#define IS_64
+
+#define PR_BYTES_PER_BYTE   1
+#define PR_BYTES_PER_SHORT  2
+#define PR_BYTES_PER_INT    4
+#define PR_BYTES_PER_INT64  8
+#define PR_BYTES_PER_LONG   4
+#define PR_BYTES_PER_FLOAT  4
+#define PR_BYTES_PER_WORD	8
+#define PR_BYTES_PER_DWORD	8
+#define PR_BYTES_PER_DOUBLE 8
+
+#define PR_BITS_PER_BYTE    8
+#define PR_BITS_PER_SHORT   16
+#define PR_BITS_PER_INT     32
+#define PR_BITS_PER_INT64   64
+#define PR_BITS_PER_LONG    32
+#define PR_BITS_PER_FLOAT   32
+#define PR_BITS_PER_WORD	64
+#define PR_BITS_PER_DWORD	64
+#define PR_BITS_PER_DOUBLE  64
+
+#define PR_BITS_PER_BYTE_LOG2   3
+#define PR_BITS_PER_SHORT_LOG2  4
+#define PR_BITS_PER_INT_LOG2    5
+#define PR_BITS_PER_INT64_LOG2  6
+#define PR_BITS_PER_LONG_LOG2   5
+#define PR_BITS_PER_FLOAT_LOG2  5
+#define PR_BITS_PER_WORD_LOG2	6
+#define PR_BITS_PER_DWORD_LOG2	6
+#define PR_BITS_PER_DOUBLE_LOG2 6
+
+#define PR_ALIGN_OF_SHORT   2
+#define PR_ALIGN_OF_INT     4
+#define PR_ALIGN_OF_LONG    4
+#define PR_ALIGN_OF_INT64   8
+#define PR_ALIGN_OF_FLOAT   4
+#define PR_ALIGN_OF_WORD	8
+#define PR_ALIGN_OF_DWORD	8
+#define PR_ALIGN_OF_DOUBLE  8
+#define PR_ALIGN_OF_POINTER 8
+
+#define PR_BYTES_PER_WORD_LOG2	3
+#define PR_BYTES_PER_DWORD_LOG2	3
+
 #else /* defined(_M_IX86) || defined(_X86_) */
 
 #error unknown processor architecture
 
 #endif /* defined(_M_IX86) || defined(_X86_) */
 
 #ifndef HAVE_LONG_LONG
 #define HAVE_LONG_LONG
--- a/pr/include/md/_win95.h
+++ b/pr/include/md/_win95.h
@@ -21,16 +21,18 @@
 #if defined(_M_IX86) || defined(_X86_)
 #define _PR_SI_ARCHITECTURE   "x86"
 #elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
 #define _PR_SI_ARCHITECTURE   "x86-64"
 #elif defined(_M_IA64) || defined(_IA64_)
 #define _PR_SI_ARCHITECTURE   "ia64"
 #elif defined(_M_ARM) || defined(_ARM_)
 #define _PR_SI_ARCHITECTURE   "arm"
+#elif defined(_M_ARM64)
+#define _PR_SI_ARCHITECTURE   "aarch64"
 #else
 #error unknown processor architecture
 #endif
 
 #define HAVE_DLL
 #undef  HAVE_THREAD_AFFINITY
 #define _PR_HAVE_GETADDRINFO
 #define _PR_INET6_PROBE