| 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..ec4c1686a45cbe6accd5a8f22f3ae7b4a0d98a55 100644
|
| --- a/src/compiler/x64/instruction-selector-x64.cc
|
| +++ b/src/compiler/x64/instruction-selector-x64.cc
|
| @@ -834,9 +834,19 @@ void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) {
|
| }
|
|
|
|
|
| -void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) {
|
| +void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) {
|
| X64OperandGenerator g(this);
|
| - Emit(kSSEFloat32ToInt64, 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(kSSEFloat32ToInt64, 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::kTryTruncateFloat32ToInt64:
|
| + return VisitTryTruncateFloat32ToInt64(result);
|
| default:
|
| break;
|
| }
|
|
|