| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/diamond.h" | 7 #include "src/compiler/diamond.h" |
| 8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
| 9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 node->InsertInput(zone(), 1, GetReplacementHigh(left)); | 296 node->InsertInput(zone(), 1, GetReplacementHigh(left)); |
| 297 | 297 |
| 298 NodeProperties::ChangeOp(node, machine()->Int32PairSub()); | 298 NodeProperties::ChangeOp(node, machine()->Int32PairSub()); |
| 299 // We access the additional return values through projections. | 299 // We access the additional return values through projections. |
| 300 Node* low_node = graph()->NewNode(common()->Projection(0), node); | 300 Node* low_node = graph()->NewNode(common()->Projection(0), node); |
| 301 Node* high_node = graph()->NewNode(common()->Projection(1), node); | 301 Node* high_node = graph()->NewNode(common()->Projection(1), node); |
| 302 ReplaceNode(node, low_node, high_node); | 302 ReplaceNode(node, low_node, high_node); |
| 303 break; | 303 break; |
| 304 } | 304 } |
| 305 // kExprI64Mul: | 305 // kExprI64Mul: |
| 306 case IrOpcode::kInt64Mul: { |
| 307 DCHECK(node->InputCount() == 2); |
| 308 |
| 309 Node* right = node->InputAt(1); |
| 310 node->ReplaceInput(1, GetReplacementLow(right)); |
| 311 node->AppendInput(zone(), GetReplacementHigh(right)); |
| 312 |
| 313 Node* left = node->InputAt(0); |
| 314 node->ReplaceInput(0, GetReplacementLow(left)); |
| 315 node->InsertInput(zone(), 1, GetReplacementHigh(left)); |
| 316 |
| 317 NodeProperties::ChangeOp(node, machine()->Int32PairMul()); |
| 318 // We access the additional return values through projections. |
| 319 Node* low_node = graph()->NewNode(common()->Projection(0), node); |
| 320 Node* high_node = graph()->NewNode(common()->Projection(1), node); |
| 321 ReplaceNode(node, low_node, high_node); |
| 322 break; |
| 323 } |
| 306 // kExprI64DivS: | 324 // kExprI64DivS: |
| 307 // kExprI64DivU: | 325 // kExprI64DivU: |
| 308 // kExprI64RemS: | 326 // kExprI64RemS: |
| 309 // kExprI64RemU: | 327 // kExprI64RemU: |
| 310 // kExprI64Ior: | 328 // kExprI64Ior: |
| 311 case IrOpcode::kWord64Or: { | 329 case IrOpcode::kWord64Or: { |
| 312 DCHECK(node->InputCount() == 2); | 330 DCHECK(node->InputCount() == 2); |
| 313 Node* left = node->InputAt(0); | 331 Node* left = node->InputAt(0); |
| 314 Node* right = node->InputAt(1); | 332 Node* right = node->InputAt(1); |
| 315 | 333 |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 common()->Phi(MachineRepresentation::kWord32, value_count), | 709 common()->Phi(MachineRepresentation::kWord32, value_count), |
| 692 value_count + 1, inputs_low, false), | 710 value_count + 1, inputs_low, false), |
| 693 graph()->NewNode( | 711 graph()->NewNode( |
| 694 common()->Phi(MachineRepresentation::kWord32, value_count), | 712 common()->Phi(MachineRepresentation::kWord32, value_count), |
| 695 value_count + 1, inputs_high, false)); | 713 value_count + 1, inputs_high, false)); |
| 696 } | 714 } |
| 697 } | 715 } |
| 698 } // namespace compiler | 716 } // namespace compiler |
| 699 } // namespace internal | 717 } // namespace internal |
| 700 } // namespace v8 | 718 } // namespace v8 |
| OLD | NEW |