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

Unified Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 1507703002: [turbofan] Change TruncateFloat64ToUint64 to TryTruncateFloatToUint64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed unused code. Created 5 years 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 | « src/compiler/x64/code-generator-x64.cc ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index f649e4d42f3834063ceccb49f512d417ce9ef02c..13dc8943826c64c3dd09079676d0ab5c332064c0 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -862,9 +862,19 @@ void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) {
}
-void InstructionSelector::VisitTruncateFloat64ToUint64(Node* node) {
+void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) {
X64OperandGenerator g(this);
- Emit(kSSEFloat64ToUint64, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
+ InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
+ InstructionOperand outputs[2];
+ size_t output_count = 0;
+ outputs[output_count++] = g.DefineAsRegister(node);
+
+ Node* success_output = NodeProperties::FindProjection(node, 1);
+ if (success_output) {
+ outputs[output_count++] = g.DefineAsRegister(success_output);
+ }
+
+ Emit(kSSEFloat64ToUint64, output_count, outputs, 1, inputs);
}
@@ -1466,6 +1476,8 @@ void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch,
return VisitBinop(this, node, kX64Sub32, &cont);
case IrOpcode::kTryTruncateFloat64ToInt64:
return VisitTryTruncateFloat64ToInt64(result);
+ case IrOpcode::kTryTruncateFloat64ToUint64:
titzer 2015/12/09 07:59:03 I should have caught this earlier. You shouldn't b
ahaas 2015/12/09 10:05:08 Done.
+ return VisitTryTruncateFloat64ToUint64(result);
default:
break;
}
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698