Bug 927408 - Disable Ion float32 optimizations on Aurora. r=bbouvier
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 24 Oct 2013 11:08:00 +0100
changeset 160909 ba246eae0c61b02916db670dfd87f5b480291ab0
parent 160908 a3b1b556e0540058ba47a7af6ffc940550e16b5e
child 160910 f3de4be1d6a5488539ebd1ac5811845bf89afaa9
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs927408
milestone26.0a2
Bug 927408 - Disable Ion float32 optimizations on Aurora. r=bbouvier
js/src/jit/x64/Lowering-x64.h
js/src/jit/x86/CodeGenerator-x86.cpp
js/src/jit/x86/Lowering-x86.h
--- a/js/src/jit/x64/Lowering-x64.h
+++ b/js/src/jit/x64/Lowering-x64.h
@@ -44,17 +44,17 @@ class LIRGeneratorX64 : public LIRGenera
     bool visitReturn(MReturn *ret);
     bool visitAsmJSUnsignedToDouble(MAsmJSUnsignedToDouble *ins);
     bool visitAsmJSLoadHeap(MAsmJSLoadHeap *ins);
     bool visitAsmJSStoreHeap(MAsmJSStoreHeap *ins);
     bool visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr *ins);
     bool visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins);
 
     static bool allowFloat32Optimizations() {
-        return true;
+        return false; // See bug 927408.
     }
 };
 
 typedef LIRGeneratorX64 LIRGeneratorSpecific;
 
 } // namespace jit
 } // namespace js
 
--- a/js/src/jit/x86/CodeGenerator-x86.cpp
+++ b/js/src/jit/x86/CodeGenerator-x86.cpp
@@ -589,18 +589,19 @@ CodeGeneratorX86::visitStoreTypedArrayEl
     const LAllocation *value = ins->value();
 
     masm.cmpl(ptr, Imm32(mir->length()));
     Label rejoin;
     masm.j(Assembler::AboveOrEqual, &rejoin);
 
     Address dstAddr(ptr, (int32_t) mir->base());
     if (vt == ArrayBufferView::TYPE_FLOAT32) {
-        JS_ASSERT(mir->value()->type() == MIRType_Float32);
-        masm.movssWithPatch(ToFloatRegister(value), dstAddr);
+        JS_ASSERT(mir->value()->type() == MIRType_Double);
+        masm.cvtsd2ss(ToFloatRegister(value), ScratchFloatReg);
+        masm.movssWithPatch(ScratchFloatReg, dstAddr);
         masm.bind(&rejoin);
         return true;
     }
     storeNonFloat32ViewTypeElement(vt, value, dstAddr);
     masm.bind(&rejoin);
     return true;
 }
 
--- a/js/src/jit/x86/Lowering-x86.h
+++ b/js/src/jit/x86/Lowering-x86.h
@@ -59,17 +59,17 @@ class LIRGeneratorX86 : public LIRGenera
         return true;
     }
 
     static bool allowStaticTypedArrayAccesses() {
         return true;
     }
 
     static bool allowFloat32Optimizations() {
-        return true;
+        return false; // See bug 927408.
     }
 };
 
 typedef LIRGeneratorX86 LIRGeneratorSpecific;
 
 } // namespace js
 } // namespace jit