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

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

Issue 1513463002: MIPS64: [turbofan] Change TruncateFloat64ToUint64 to TryTruncateFloatToUint64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@trytrunc-uint64
Patch Set: 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/mips64/code-generator-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips64/instruction-selector-mips64.cc
diff --git a/src/compiler/mips64/instruction-selector-mips64.cc b/src/compiler/mips64/instruction-selector-mips64.cc
index aa898c04e0795340b9fceda75581cc3aac08961b..556ca2f4be036e6b789ac181746c762edc4049c8 100644
--- a/src/compiler/mips64/instruction-selector-mips64.cc
+++ b/src/compiler/mips64/instruction-selector-mips64.cc
@@ -877,11 +877,19 @@ void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) {
void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) {
- if (NodeProperties::FindProjection(node, 1)) {
- // TODO(mips): implement the second return value.
- UNIMPLEMENTED();
+ Mips64OperandGenerator g(this);
+
+ 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);
}
- VisitRR(this, kMips64TruncUlD, node);
+
+ Emit(kMips64TruncUlD, output_count, outputs, 1, inputs);
}
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698