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 171c0007af740b61ad638cf610e3163cdc5afcf0..1935ee508eb28273021c65a9a0f2521f573c394f 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -1893,7 +1893,13 @@ void CodeGenerator::AssembleMove(InstructionOperand* source, |
DCHECK(destination->IsFPRegister() || destination->IsFPStackSlot()); |
MemOperand src = g.ToMemOperand(source); |
if (destination->IsFPRegister()) { |
- __ ldc1(g.ToDoubleRegister(destination), src); |
+ LocationOperand* op = LocationOperand::cast(source); |
+ if (op->representation() == MachineRepresentation::kFloat64) { |
+ __ ldc1(g.ToDoubleRegister(destination), src); |
+ } else { |
+ DCHECK_EQ(MachineRepresentation::kFloat32, op->representation()); |
+ __ lwc1(g.ToDoubleRegister(destination), src); |
+ } |
} else { |
FPURegister temp = kScratchDoubleReg; |
__ ldc1(temp, src); |