Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2542)

Unified Diff: src/compiler/x64/code-generator-x64.cc

Issue 436623002: TF: Clear upper bits of ConvertFloat64ToUint32 because Win64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/x64/linkage-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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: {
« no previous file with comments | « no previous file | src/compiler/x64/linkage-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698