Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index a8809f869da46c1edf5bd69e4083b7dc878da7a1..f56e2ca12bb6375c0a4f93b30469ab7a90cd275a 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -2062,9 +2062,14 @@ void CodeGenerator::AssembleMove(InstructionOperand* source, |
} else if (src.type() == Constant::kFloat32) { |
if (destination->IsFPStackSlot()) { |
MemOperand dst = g.ToMemOperand(destination); |
- __ li(at, Operand(bit_cast<int32_t>(src.ToFloat32()))); |
- __ sw(at, dst); |
+ if (bit_cast<int32_t>(src.ToFloat32()) == 0) { |
+ __ sw(zero_reg, dst); |
+ } else { |
+ __ li(at, Operand(bit_cast<int32_t>(src.ToFloat32()))); |
+ __ sw(at, dst); |
+ } |
} else { |
+ DCHECK(destination->IsFPRegister()); |
FloatRegister dst = g.ToSingleRegister(destination); |
__ Move(dst, src.ToFloat32()); |
} |