Index: src/compiler/x87/code-generator-x87.cc |
diff --git a/src/compiler/x87/code-generator-x87.cc b/src/compiler/x87/code-generator-x87.cc |
index 96e029111bf618ae87a8b15eed96194c4fb3ef09..937d735874c519cb46af4986025d7a719b7c6671 100644 |
--- a/src/compiler/x87/code-generator-x87.cc |
+++ b/src/compiler/x87/code-generator-x87.cc |
@@ -972,6 +972,20 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
__ lea(esp, Operand(esp, kDoubleSize)); |
break; |
} |
+ case kX87Int32ToFloat32: { |
+ InstructionOperand* input = instr->InputAt(0); |
+ DCHECK(input->IsRegister() || input->IsStackSlot()); |
+ __ fstp(0); |
+ if (input->IsRegister()) { |
+ Register input_reg = i.InputRegister(0); |
+ __ push(input_reg); |
+ __ fild_s(Operand(esp, 0)); |
+ __ pop(input_reg); |
+ } else { |
+ __ fild_s(i.InputOperand(0)); |
+ } |
+ break; |
+ } |
case kX87Int32ToFloat64: { |
InstructionOperand* input = instr->InputAt(0); |
DCHECK(input->IsRegister() || input->IsStackSlot()); |