From fbc5612f2ea1f17c591384e7ff1287dc51aaeae6 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 16 Feb 2010 15:07:14 +1100 Subject: [PATCH] Bug 542133 - Add a real NJConfig struct to nanojit (TM-specific part). code=stejohns, r=nnethercote. --- js/src/Makefile.in | 2 ++ js/src/jstracer.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/js/src/Makefile.in b/js/src/Makefile.in index ebf2f74d98a..50b079ec5ce 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -239,6 +239,7 @@ INSTALLED_HEADERS += \ Fragmento.h \ Native.h \ Native$(NANOJIT_ARCH).h \ + njconfig.h \ RegAlloc.h \ nanojit.h \ VMPI.h \ @@ -252,6 +253,7 @@ CPPSRCS += \ Containers.cpp \ Fragmento.cpp \ LIR.cpp \ + njconfig.cpp \ RegAlloc.cpp \ avmplus.cpp \ Native$(NANOJIT_ARCH).cpp \ diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index eeff98a6f05..51a919ca1a3 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -2239,7 +2239,8 @@ TraceRecorder::TraceRecorder(JSContext* cx, VMSideExit* anchor, VMFragment* frag } ) // CseFilter must be downstream of SoftFloatFilter (see bug 527754 for why). - lir = new (tempAlloc()) CseFilter(lir, tempAlloc()); + if (avmplus::AvmCore::config.cseopt) + lir = new (tempAlloc()) CseFilter(lir, tempAlloc()); #if NJ_SOFTFLOAT_SUPPORTED if (nanojit::AvmCore::config.soft_float) lir = new (tempAlloc()) SoftFloatFilter(lir); @@ -2675,7 +2676,7 @@ TraceMonitor::flush() globalStates[i].globalSlots = new (alloc) SlotList(&alloc); } - assembler = new (alloc) Assembler(*codeAlloc, alloc, alloc, core, &LogController); + assembler = new (alloc) Assembler(*codeAlloc, alloc, alloc, core, &LogController, avmplus::AvmCore::config); verbose_only( branches = NULL; ) memset(&vmfragments[0], 0, FRAGMENT_TABLE_SIZE * sizeof(TreeFragment*)); @@ -7341,9 +7342,9 @@ InitJIT(TraceMonitor *tm) if (!did_we_check_processor_features) { #if defined NANOJIT_IA32 - avmplus::AvmCore::config.use_cmov = - avmplus::AvmCore::config.sse2 = CheckForSSE2(); - avmplus::AvmCore::config.fixed_esp = true; + avmplus::AvmCore::config.i386_use_cmov = + avmplus::AvmCore::config.i386_sse2 = CheckForSSE2(); + avmplus::AvmCore::config.i386_fixed_esp = true; #endif #if defined NANOJIT_ARM