Index: src/compiler/x64/code-generator-x64.cc |
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc |
index de8956e01d248a1ce47b76b297fae2aee4e5080f..ebd3d9a6cf8700b0af3d00e7ae5831e2b46df310 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -408,7 +408,11 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
__ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
break; |
case kSSECvtsd2ss: |
- __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
+ if (instr->InputAt(0)->IsDoubleRegister()) { |
+ __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
+ } else { |
+ __ cvtsd2ss(i.OutputDoubleRegister(), i.InputOperand(0)); |
+ } |
break; |
case kSSEFloat64ToInt32: |
if (instr->InputAt(0)->IsDoubleRegister()) { |