Bug 978456 - Fix --no-fpu shell flag. r=luke
☠☠ backed out by 572ba5387030 ☠ ☠
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 03 Mar 2014 15:45:44 +0100
changeset 171774 8ab0a696d2ec809312818fc2ffae2253a8180283
parent 171773 56f9890e7fd9196f714ca84e3c6dff03bb6a92c7
child 171878 ad8ef80593395c7e0a5e1f7c2b54eaca00199e51
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersluke
bugs978456
milestone30.0a1
Bug 978456 - Fix --no-fpu shell flag. r=luke
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -5770,32 +5770,16 @@ SetRuntimeOptions(JSRuntime *rt, const O
             parallelCompilation = false;
         else if (strcmp(str, "on") != 0)
             return OptionFailure("ion-parallel-compile", str);
     }
 #ifdef JS_THREADSAFE
     rt->setParallelIonCompilationEnabled(parallelCompilation);
 #endif
 
-#if defined(JS_CODEGEN_X86) && defined(DEBUG)
-    if (op.getBoolOption("no-fpu"))
-        JSC::MacroAssembler::SetFloatingPointDisabled();
-#endif
-
-#if (defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)) && defined(DEBUG)
-    if (op.getBoolOption("no-sse3")) {
-        JSC::MacroAssembler::SetSSE3Disabled();
-        PropagateFlagToNestedShells("--no-sse3");
-    }
-    if (op.getBoolOption("no-sse4")) {
-        JSC::MacroAssembler::SetSSE4Disabled();
-        PropagateFlagToNestedShells("--no-sse4");
-    }
-#endif
-
 #endif // JS_ION
 
 #ifdef JS_ARM_SIMULATOR
     if (op.getBoolOption("arm-sim-icache-checks"))
         jit::Simulator::ICacheCheckingEnabled = true;
 
     int32_t stopAt = op.getIntOption("arm-sim-stop-at");
     if (stopAt >= 0)
@@ -6043,18 +6027,35 @@ main(int argc, char **argv, char **envp)
         return EXIT_SUCCESS;
 
 #ifdef DEBUG
     /*
      * Process OOM options as early as possible so that we can observe as many
      * allocations as possible.
      */
     OOM_printAllocationCount = op.getBoolOption('O');
+
+#if defined(JS_CODEGEN_X86) && defined(JS_ION)
+    if (op.getBoolOption("no-fpu"))
+        JSC::MacroAssembler::SetFloatingPointDisabled();
 #endif
 
+#if (defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)) && defined(JS_ION)
+    if (op.getBoolOption("no-sse3")) {
+        JSC::MacroAssembler::SetSSE3Disabled();
+        PropagateFlagToNestedShells("--no-sse3");
+    }
+    if (op.getBoolOption("no-sse4")) {
+        JSC::MacroAssembler::SetSSE4Disabled();
+        PropagateFlagToNestedShells("--no-sse4");
+    }
+#endif
+
+#endif // DEBUG
+
     // Start the engine.
     if (!JS_Init())
         return 1;
 
     /* Use the same parameters as the browser in xpcjsruntime.cpp. */
     rt = JS_NewRuntime(32L * 1024L * 1024L, JS_USE_HELPER_THREADS);
     if (!rt)
         return 1;