Bug 605192 - JM: make f.apply(x, obj) fast, part 3 (r=sstangl)
authorLuke Wagner <lw@mozilla.com>
Thu, 28 Oct 2010 17:15:49 -0700
changeset 57716 8715628a75f886d927cfacf8a83b20692a92650a
parent 57715 fd21a9d4344aa3d9f188bbb7190133172b26e487
child 57717 d9aceaabef2867a10835263c6ac6ee619a4883dc
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewerssstangl
bugs605192
milestone2.0b8pre
Bug 605192 - JM: make f.apply(x, obj) fast, part 3 (r=sstangl)
js/src/methodjit/MachineRegs.h
--- a/js/src/methodjit/MachineRegs.h
+++ b/js/src/methodjit/MachineRegs.h
@@ -50,17 +50,17 @@ namespace mjit {
 struct Registers {
 
     typedef JSC::MacroAssembler::RegisterID RegisterID;
 
     // Homed and scratch registers for working with Values on x64.
 #if defined(JS_CPU_X64)
     static const RegisterID TypeMaskReg = JSC::X86Registers::r13;
     static const RegisterID PayloadMaskReg = JSC::X86Registers::r14;
-    static const RegisterID ValueReg = JSC::X86Registers::r15;
+    static const RegisterID ValueReg = JSC::X86Registers::r10;
 #endif
 
     // Register that homes the current JSStackFrame.
 #if defined(JS_CPU_X86) || defined(JS_CPU_X64)
     static const RegisterID JSFrameReg = JSC::X86Registers::ebx;
 #elif defined(JS_CPU_ARM)
     static const RegisterID JSFrameReg = JSC::ARMRegisters::r11;
 #endif
@@ -102,31 +102,30 @@ struct Registers {
 #if defined(JS_CPU_X86) || defined(JS_CPU_X64)
     static const uint32 TempRegs =
           (1 << JSC::X86Registers::eax)
         | (1 << JSC::X86Registers::ecx)
         | (1 << JSC::X86Registers::edx)
 # if defined(JS_CPU_X64)
         | (1 << JSC::X86Registers::r8)
         | (1 << JSC::X86Registers::r9)
-        | (1 << JSC::X86Registers::r10)
 #  if !defined(_MSC_VER)
         | (1 << JSC::X86Registers::esi)
         | (1 << JSC::X86Registers::edi)
 #  endif
 # endif
         ;
 
 # if defined(JS_CPU_X64)
     static const uint32 SavedRegs =
         /* r11 is scratchRegister, used by JSC. */
           (1 << JSC::X86Registers::r12)
     // r13 is TypeMaskReg.
     // r14 is PayloadMaskReg.
-    // r15 is ValueReg.
+        | (1 << JSC::X86Registers::r15)
 #  if defined(_MSC_VER)
         | (1 << JSC::X86Registers::esi)
         | (1 << JSC::X86Registers::edi)
 #  endif
 # else
     static const uint32 SavedRegs =
           (1 << JSC::X86Registers::esi)
         | (1 << JSC::X86Registers::edi)