Bug 972836 - IonMonkey MIPS: Odd float registers follow-up. r=jandem
authorBranislav Rankov <branislav.rankov@imgtec.com>
Thu, 24 Apr 2014 16:59:47 +0200
changeset 182144 5a98a30d97b146c86201e02d1633da631bcb659b
parent 182143 8f222fa5f7e2d347fb7812a9962332869973ef53
child 182145 5fce8c9d9c0ffb82fb7ebd9452ab71cd2f395f91
push id26748
push userryanvm@gmail.com
push dateThu, 08 May 2014 19:44:34 +0000
treeherdermozilla-central@4cafec48a1f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs972836
milestone32.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 972836 - IonMonkey MIPS: Odd float registers follow-up. r=jandem
js/src/jit/mips/Trampoline-mips.cpp
--- a/js/src/jit/mips/Trampoline-mips.cpp
+++ b/js/src/jit/mips/Trampoline-mips.cpp
@@ -332,17 +332,20 @@ JitRuntime::generateInvalidator(JSContex
     for (uint32_t i = 0; i < Registers::Total; i++) {
         Address address = Address(StackPointer, InvalidationBailoutStack::offsetOfRegs() +
                                                 i * sizeof(uintptr_t));
         masm.storePtr(Register::FromCode(i), address);
     }
 
     // Save floating point registers
     // We can use as_sd because stack is alligned.
-    for (uint32_t i = 0; i < FloatRegisters::Total; i++)
+    // :TODO: (Bug 972836) // Fix this once odd regs can be used as float32
+    // only. For now we skip saving odd regs for O32 ABI.
+    uint32_t increment = 2;
+    for (uint32_t i = 0; i < FloatRegisters::Total; i += increment)
         masm.as_sd(FloatRegister::FromCode(i), StackPointer,
                    InvalidationBailoutStack::offsetOfFpRegs() + i * sizeof(double));
 
     // Pass pointer to InvalidationBailoutStack structure.
     masm.movePtr(StackPointer, a0);
 
     // Reserve place for return value and BailoutInfo pointer
     masm.subPtr(Imm32(2 * sizeof(uintptr_t)), StackPointer);
@@ -551,17 +554,20 @@ GenerateBailoutThunk(JSContext *cx, Macr
     // Save general purpose registers.
     for (uint32_t i = 0; i < Registers::Total; i++) {
         uint32_t off = BailoutStack::offsetOfRegs() + i * sizeof(uintptr_t);
         masm.storePtr(Register::FromCode(i), Address(StackPointer, off));
     }
 
     // Save floating point registers
     // We can use as_sd because stack is alligned.
-    for (uintptr_t i = 0; i < FloatRegisters::Total; i++)
+    // :TODO: (Bug 972836) // Fix this once odd regs can be used as float32
+    // only. For now we skip saving odd regs for O32 ABI.
+    uint32_t increment = 2;
+    for (uint32_t i = 0; i < FloatRegisters::Total; i += increment)
         masm.as_sd(FloatRegister::FromCode(i), StackPointer,
                    BailoutStack::offsetOfFpRegs() + i * sizeof(double));
 
     // Store the frameSize_ or tableOffset_ stored in ra
     // See: JitRuntime::generateBailoutTable()
     // See: CodeGeneratorMIPS::generateOutOfLineCode()
     masm.storePtr(ra, Address(StackPointer, BailoutStack::offsetOfFrameSize()));