Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index 5cf9d97ae6c3f3cee78dd42c6d2fcfb1bc743eed..ce5ce1e2e9d581e3c7855ee4f38ef99cac41fe4e 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -716,8 +716,12 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
CHECK(false); |
} |
} else if (op->IsFPStackSlot()) { |
- DCHECK(IsFloatingPoint(type.representation())); |
- translation->StoreDoubleStackSlot(LocationOperand::cast(op)->index()); |
+ if (type.representation() == MachineRepresentation::kFloat64) { |
+ translation->StoreDoubleStackSlot(LocationOperand::cast(op)->index()); |
+ } else { |
+ DCHECK_EQ(MachineRepresentation::kFloat32, type.representation()); |
+ translation->StoreFloatStackSlot(LocationOperand::cast(op)->index()); |
+ } |
} else if (op->IsRegister()) { |
InstructionOperandConverter converter(this, instr); |
if (type.representation() == MachineRepresentation::kBit) { |
@@ -734,9 +738,13 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
CHECK(false); |
} |
} else if (op->IsFPRegister()) { |
- DCHECK(IsFloatingPoint(type.representation())); |
InstructionOperandConverter converter(this, instr); |
- translation->StoreDoubleRegister(converter.ToDoubleRegister(op)); |
+ if (type.representation() == MachineRepresentation::kFloat64) { |
+ translation->StoreDoubleRegister(converter.ToDoubleRegister(op)); |
+ } else { |
+ DCHECK_EQ(MachineRepresentation::kFloat32, type.representation()); |
+ translation->StoreFloatRegister(converter.ToFloatRegister(op)); |
+ } |
} else if (op->IsImmediate()) { |
InstructionOperandConverter converter(this, instr); |
Constant constant = converter.ToConstant(op); |