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 abe921b045f0a69596a8ddb5e8094de9a88b54e6..dd97bb338ffbfb1cb91713c6f9a7eba27888763c 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -496,6 +496,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
case kSSEFloat64ToUint32: { |
// TODO(turbofan): X64 SSE cvttsd2siq should support operands. |
__ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
+ __ 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. |
break; |
} |
case kSSEInt32ToFloat64: { |