| 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 f93ad21a219a09c0ca51f556dbf9d457a8a58ad1..cb10477a3691ecf23a149f3570e28498de8d9259 100644
|
| --- a/src/compiler/x64/code-generator-x64.cc
|
| +++ b/src/compiler/x64/code-generator-x64.cc
|
| @@ -469,8 +469,12 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| break;
|
| }
|
| case kSSEFloat64ToUint32: {
|
| - // TODO(turbofan): X64 SSE cvttsd2siq should support operands.
|
| - __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0));
|
| + RegisterOrOperand input = i.InputRegisterOrOperand(0);
|
| + if (input.type == kDoubleRegister) {
|
| + __ cvttsd2siq(i.OutputRegister(), input.double_reg);
|
| + } else {
|
| + __ cvttsd2siq(i.OutputRegister(), input.operand);
|
| + }
|
| __ andl(i.OutputRegister(), i.OutputRegister()); // clear upper bits.
|
| // TODO(turbofan): generated code should not look at the upper 32 bits
|
| // of the result, but those bits could escape to the outside world.
|
|
|