Bug 1393723 - Fix handling of float32 WasmStackArgs on mips32. r=lth
authorDragan Mladjenovic <dragan.mladjenovic@rt-rk.com>
Tue, 29 Aug 2017 00:50:00 -0400
changeset 377558 290b34ee2388
parent 377557 4fd740b71f29
child 377559 04a30a0ba074
push id94292
push userryanvm@gmail.com
push dateTue, 29 Aug 2017 18:45:26 +0000
treeherdermozilla-inbound@81cdf89896a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1393723
milestone57.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 1393723 - Fix handling of float32 WasmStackArgs on mips32. r=lth Current implementation was incorrectly treating all floating-point values as doubles.
js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp
--- a/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp
+++ b/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp
@@ -2291,18 +2291,21 @@ void
 CodeGeneratorMIPSShared::visitWasmStackArg(LWasmStackArg* ins)
 {
     const MWasmStackArg* mir = ins->mir();
     if (ins->arg()->isConstant()) {
         masm.storePtr(ImmWord(ToInt32(ins->arg())), Address(StackPointer, mir->spOffset()));
     } else {
         if (ins->arg()->isGeneralReg()) {
             masm.storePtr(ToRegister(ins->arg()), Address(StackPointer, mir->spOffset()));
+        } else if (mir->input()->type() == MIRType::Double) {
+            masm.storeDouble(ToFloatRegister(ins->arg()).doubleOverlay(),
+                             Address(StackPointer, mir->spOffset()));
         } else {
-            masm.storeDouble(ToFloatRegister(ins->arg()).doubleOverlay(),
+            masm.storeFloat32(ToFloatRegister(ins->arg()),
                              Address(StackPointer, mir->spOffset()));
         }
     }
 }
 
 void
 CodeGeneratorMIPSShared::visitWasmStackArgI64(LWasmStackArgI64* ins)
 {