Chromium Code Reviews| 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 4e56b0726d447ef6d709e8108bff13b21668078e..25149db0a55704a9f2accde0bcf283e27467a6b7 100644 |
| --- a/src/compiler/mips64/instruction-selector-mips64.cc |
| +++ b/src/compiler/mips64/instruction-selector-mips64.cc |
| @@ -850,8 +850,19 @@ void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
| } |
| -void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) { |
| - VisitRR(this, kMips64TruncLS, node); |
| +void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
| + 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); |
| + } |
| + |
| + this->Emit(kMips64TruncLS, output_count, outputs, 1, inputs); |
| } |
| @@ -1529,6 +1540,8 @@ void VisitWordCompareZero(InstructionSelector* selector, Node* user, |
| case IrOpcode::kInt32SubWithOverflow: |
| cont->OverwriteAndNegateIfEqual(kOverflow); |
| return VisitBinop(selector, node, kMips64Dsub, cont); |
| + case IrOpcode::kTryTruncateFloat32ToInt64: |
|
titzer
2015/12/09 11:40:35
Drop this case as per explanation on other CL.
|
| + return VisitTryTruncFloat32ToInt64(selector, result); |
| default: |
| break; |
| } |