Bug 1287356 - IonMonkey: MIPS: Implement MacroAssembler::outOfLineTruncateSlow. r=lth
authorHeiher <r@hev.cc>
Tue, 19 Jul 2016 23:43:36 +0800
changeset 389632 71f037e18d18d1b5241d31e27f8cbb987a21230a
parent 389631 81cb60fb8fbd8ef529f2a2c21852888b5fdab88b
child 389633 3864de2e79477e1e522f87850d4fd3c1d707022c
push id23471
push userbmo:tchiovoloni@mozilla.com
push dateTue, 19 Jul 2016 18:52:45 +0000
reviewerslth
bugs1287356
milestone50.0a1
Bug 1287356 - IonMonkey: MIPS: Implement MacroAssembler::outOfLineTruncateSlow. r=lth --- js/src/jit/MacroAssembler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
js/src/jit/MacroAssembler.cpp
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -1915,17 +1915,18 @@ MacroAssembler::convertTypedOrValueToFlo
         MOZ_CRASH("Bad MIRType");
     }
 }
 
 void
 MacroAssembler::outOfLineTruncateSlow(FloatRegister src, Register dest, bool widenFloatToDouble,
                                       bool compilingWasm)
 {
-#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)
+#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \
+    defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
     if (widenFloatToDouble) {
         convertFloat32ToDouble(src, ScratchDoubleReg);
         src = ScratchDoubleReg;
     }
 #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
     FloatRegister srcSingle;
     if (widenFloatToDouble) {
         MOZ_ASSERT(src.isSingle());
@@ -1944,17 +1945,18 @@ MacroAssembler::outOfLineTruncateSlow(Fl
     setupUnalignedABICall(dest);
     passABIArg(src, MoveOp::DOUBLE);
     if (compilingWasm)
         callWithABI(wasm::SymbolicAddress::ToInt32);
     else
         callWithABI(mozilla::BitwiseCast<void*, int32_t(*)(double)>(JS::ToInt32));
     storeCallResult(dest);
 
-#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)
+#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \
+    defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
     // Nothing
 #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
     if (widenFloatToDouble)
         pop(srcSingle);
 #else
     MOZ_CRASH("MacroAssembler platform hook: outOfLineTruncateSlow");
 #endif
 }