Index: src/compiler/mips64/code-generator-mips64.cc |
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc |
index 6fef2884bef761169780a11f68d9780b8fa95fd3..7db7ce9b968ecae8b231ceb52f72ddcfbf4d0fbd 100644 |
--- a/src/compiler/mips64/code-generator-mips64.cc |
+++ b/src/compiler/mips64/code-generator-mips64.cc |
@@ -2385,9 +2385,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()); |
} |