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 8d9d782e71ae72d7bf76e2106ec9ed0f8460ce2a..c81be7d1b7302b7c2cef5ce7737c1e52c52bf09a 100644 |
--- a/src/compiler/mips64/instruction-selector-mips64.cc |
+++ b/src/compiler/mips64/instruction-selector-mips64.cc |
@@ -829,11 +829,18 @@ void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) { |
void InstructionSelector::VisitTryTruncateFloat64ToInt64(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, kMips64TruncLD, node); |
+ |
+ Emit(kMips64TruncLD, output_count, outputs, 1, inputs); |
} |