Bug 541491 - ARM_ARCH, ARM_VFP, and ARM_THUMB2 should be runtime options everywhere (TM-specific part). code=stejohns, r=nnethercote.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 28 Jan 2010 09:41:07 +1100
changeset 37773 504415c9f843f8ab8cadbed85db26567506e8f1c
parent 37772 9beb3e961a1f2d7678c8b39719d80dea3d437dc6
child 37774 3c3b005de959d4c19f1f76855ba6ae8c80200544
push id11426
push userrsayre@mozilla.com
push dateSun, 31 Jan 2010 16:36:36 +0000
treeherderautoland@3048d03980e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnnethercote
bugs541491
milestone1.9.3a1pre
Bug 541491 - ARM_ARCH, ARM_VFP, and ARM_THUMB2 should be runtime options everywhere (TM-specific part). code=stejohns, r=nnethercote.
js/src/jsregexp.cpp
js/src/jstracer.cpp
--- a/js/src/jsregexp.cpp
+++ b/js/src/jsregexp.cpp
@@ -3176,17 +3176,17 @@ class RegExpNativeCompiler {
             return JS_FALSE;
         }
 
         /* At this point we have an empty fragment. */
         LirBuffer* lirbuf = fragment->lirbuf;
         if (outOfMemory())
             goto fail;
         /* FIXME Use bug 463260 smart pointer when available. */
-        lir = lirBufWriter = new LirBufWriter(lirbuf);
+        lir = lirBufWriter = new LirBufWriter(lirbuf, nanojit::AvmCore::config);
 
         /* FIXME Use bug 463260 smart pointer when available. */
 #ifdef NJ_VERBOSE
         debug_only_stmt(
             if (LogController.lcbits & LC_TMRegexp) {
                 lir = verbose_filter = new VerboseWriter(tempAlloc, lir, lirbuf->names,
                                                          &LogController);
             }
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -2448,17 +2448,17 @@ TraceRecorder::TraceRecorder(JSContext* 
 
     debug_only_printf(LC_TMTracer, "globalObj=%p, shape=%d\n",
                       (void*)this->globalObj, OBJ_SHAPE(this->globalObj));
     debug_only_printf(LC_TMTreeVis, "TREEVIS RECORD FRAG=%p ANCHOR=%p\n", (void*)fragment,
                       (void*)anchor);
 #endif
 
     nanojit::LirWriter*& lir = InitConst(this->lir);
-    lir = new (tempAlloc()) LirBufWriter(lirbuf);
+    lir = new (tempAlloc()) LirBufWriter(lirbuf, nanojit::AvmCore::config);
 #ifdef DEBUG
     lir = new (tempAlloc()) ValidateWriter(lir, "end of writer pipeline");
 #endif
     debug_only_stmt(
         if (LogController.lcbits & LC_TMRecorder) {
            lir = new (tempAlloc()) VerboseWriter(tempAlloc(), lir, lirbuf->names,
                                                &LogController);
         }
@@ -7625,21 +7625,21 @@ InitJIT(TraceMonitor *tm)
 
         bool            arm_vfp     = arm_check_vfp();
         bool            arm_thumb   = arm_check_thumb();
         bool            arm_thumb2  = arm_check_thumb2();
         unsigned int    arm_arch    = arm_check_arch();
 
         enable_debugger_exceptions();
 
-        avmplus::AvmCore::config.vfp        = arm_vfp;
-        avmplus::AvmCore::config.soft_float = !arm_vfp;
-        avmplus::AvmCore::config.thumb      = arm_thumb;
-        avmplus::AvmCore::config.thumb2     = arm_thumb2;
-        avmplus::AvmCore::config.arch       = arm_arch;
+        avmplus::AvmCore::config.arm_vfp        = arm_vfp;
+        avmplus::AvmCore::config.soft_float     = !arm_vfp;
+        avmplus::AvmCore::config.arm_thumb      = arm_thumb;
+        avmplus::AvmCore::config.arm_thumb2     = arm_thumb2;
+        avmplus::AvmCore::config.arm_arch       = arm_arch;
 
         // Sanity-check the configuration detection.
         //  * We don't understand architectures prior to ARMv4.
         JS_ASSERT(arm_arch >= 4);
         //  * All architectures support Thumb with the possible exception of ARMv4.
         JS_ASSERT((arm_thumb) || (arm_arch == 4));
         //  * Only ARMv6T2 and ARMv7(+) support Thumb2, but ARMv6 does not.
         JS_ASSERT((arm_thumb2) || (arm_arch <= 6));