Bug 1213752 - IonMonkey: MIPS: Enable MIPS64 support. r=glandium
authorHeiher <r@hev.cc>
Sat, 07 Nov 2015 05:51:14 +0800
changeset 307562 86c2bbe4bae4d53f066d3deb2cfa90cbc3df97ad
parent 307561 3f23b1b32212669797cc3245c3f6950c169ff56e
child 307563 cd06102276f5b654eed62863cf2cde29478c2294
push id1040
push userraliiev@mozilla.com
push dateMon, 29 Feb 2016 17:11:22 +0000
treeherdermozilla-release@8c3167321162 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1213752
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1213752 - IonMonkey: MIPS: Enable MIPS64 support. r=glandium --- js/src/configure.in | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-)
js/src/configure.in
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -976,16 +976,20 @@ x86_64 | ia64)
 arm*)
     CPU_ARCH=arm
     ;;
 
 mips|mipsel)
     CPU_ARCH="mips32"
     ;;
 
+mips64|mips64el)
+    CPU_ARCH="mips64"
+    ;;
+
 aarch64*)
     CPU_ARCH=aarch64
     ;;
 
 esac
 
 if test -z "$OS_TARGET"; then
     OS_TARGET=$OS_ARCH
@@ -2052,28 +2056,21 @@ dnl ENABLE_ION=0
     AC_DEFINE(JS_CPU_SPARC)
     ;;
 mips*-*)
     ENABLE_ION=1
     AC_DEFINE(JS_CPU_MIPS)
     ;;
 esac
 
-case "$target" in
-mips*-*)
-     AC_DEFINE(JS_NUNBOX32)
-     ;;
-*)
-    if test "$HAVE_64BIT_BUILD" ; then
-        AC_DEFINE(JS_PUNBOX64)
-    else
-        AC_DEFINE(JS_NUNBOX32)
-    fi
-    ;;
-esac
+if test "$HAVE_64BIT_BUILD" ; then
+    AC_DEFINE(JS_PUNBOX64)
+else
+    AC_DEFINE(JS_NUNBOX32)
+fi
 
 MOZ_ARG_DISABLE_BOOL(ion,
 [  --disable-ion      Disable use of the IonMonkey JIT],
   ENABLE_ION= )
 
 AC_SUBST(ENABLE_METHODJIT_SPEW)
 
 AC_SUBST(ENABLE_ION)
@@ -3067,26 +3064,26 @@ fi
 AC_SUBST(MOZ_VALGRIND)
 
 dnl ========================================================
 dnl = Use a JIT code simulator for a foreign architecture.
 dnl ========================================================
 MOZ_ARG_ENABLE_STRING(simulator,
 [  --enable-simulator=ARCH
                           Enable a JIT code simulator for the specified arch.
-                          (arm, arm64, mips32).],
+                          (arm, arm64, mips32, mips64).],
     JS_SIMULATOR="$enableval")
 
 if test -n "$JS_SIMULATOR"; then
     case "$JS_SIMULATOR" in
-        arm|arm64|mips32) ;;
+        arm|arm64|mips32|mips64) ;;
         no)
             JS_SIMULATOR=
             ;;
-        *) AC_MSG_ERROR([Invalid simulator. Valid simulators are: arm, arm64, mips32.]) ;;
+        *) AC_MSG_ERROR([Invalid simulator. Valid simulators are: arm, arm64, mips32, mips64.]) ;;
     esac
 fi
 
 if test -z "$ENABLE_ION"; then
     AC_DEFINE(JS_CODEGEN_NONE)
     JS_CODEGEN_NONE=1
 elif test "$JS_SIMULATOR" = arm; then
     if test "$CPU_ARCH" != "x86"; then
@@ -3112,16 +3109,25 @@ elif test "$JS_SIMULATOR" = mips32; then
     if test "$CPU_ARCH" != "x86"; then
         AC_MSG_ERROR([The MIPS32 simulator only works on x86.])
     fi
     AC_DEFINE(JS_SIMULATOR)
     AC_DEFINE(JS_SIMULATOR_MIPS32)
     AC_DEFINE(JS_CODEGEN_MIPS32)
     JS_SIMULATOR_MIPS32=1
     JS_CODEGEN_MIPS32=1
+elif test "$JS_SIMULATOR" = mips64; then
+    if test "$CPU_ARCH" != "x86_64"; then
+        AC_MSG_ERROR([The MIPS64 simulator only works on x86_64.])
+    fi
+    AC_DEFINE(JS_SIMULATOR)
+    AC_DEFINE(JS_SIMULATOR_MIPS64)
+    AC_DEFINE(JS_CODEGEN_MIPS64)
+    JS_SIMULATOR_MIPS64=1
+    JS_CODEGEN_MIPS64=1
 elif test "$CPU_ARCH" = "x86"; then
     AC_DEFINE(JS_CODEGEN_X86)
     JS_CODEGEN_X86=1
 elif test "$CPU_ARCH" = "x86_64"; then
     AC_DEFINE(JS_CODEGEN_X64)
     JS_CODEGEN_X64=1
 
     dnl Signal-handler OOM checking requires large mprotected guard regions, so
@@ -3133,25 +3139,30 @@ elif test "$CPU_ARCH" = "arm"; then
     JS_CODEGEN_ARM=1
     if test -n "$MOZ_DEBUG"; then
         AC_DEFINE(JS_DISASM_ARM)
         JS_DISASM_ARM=1
     fi
 elif test "$CPU_ARCH" = "mips32"; then
     AC_DEFINE(JS_CODEGEN_MIPS32)
     JS_CODEGEN_MIPS32=1
+elif test "$CPU_ARCH" = "mips64"; then
+    AC_DEFINE(JS_CODEGEN_MIPS64)
+    JS_CODEGEN_MIPS64=1
 fi
 
 AC_SUBST(JS_SIMULATOR)
 AC_SUBST(JS_SIMULATOR_ARM)
 AC_SUBST(JS_SIMULATOR_ARM64)
 AC_SUBST(JS_SIMULATOR_MIPS32)
+AC_SUBST(JS_SIMULATOR_MIPS64)
 AC_SUBST(JS_CODEGEN_ARM)
 AC_SUBST(JS_CODEGEN_ARM64)
 AC_SUBST(JS_CODEGEN_MIPS32)
+AC_SUBST(JS_CODEGEN_MIPS64)
 AC_SUBST(JS_CODEGEN_X86)
 AC_SUBST(JS_CODEGEN_X64)
 AC_SUBST(JS_CODEGEN_NONE)
 AC_SUBST(JS_DISASM_ARM)
 AC_SUBST(ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_OOB)
 
 dnl ========================================================
 dnl jprof