| 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/base/bits.h" | 5 #include "src/base/bits.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 } | 638 } |
| 639 VisitShift(this, node, TryMatchASR); | 639 VisitShift(this, node, TryMatchASR); |
| 640 } | 640 } |
| 641 | 641 |
| 642 | 642 |
| 643 void InstructionSelector::VisitWord32Ror(Node* node) { | 643 void InstructionSelector::VisitWord32Ror(Node* node) { |
| 644 VisitShift(this, node, TryMatchROR); | 644 VisitShift(this, node, TryMatchROR); |
| 645 } | 645 } |
| 646 | 646 |
| 647 | 647 |
| 648 void InstructionSelector::VisitWord32Clz(Node* node) { |
| 649 ArmOperandGenerator g(this); |
| 650 Emit(kArmClz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
| 651 } |
| 652 |
| 653 |
| 648 void InstructionSelector::VisitInt32Add(Node* node) { | 654 void InstructionSelector::VisitInt32Add(Node* node) { |
| 649 ArmOperandGenerator g(this); | 655 ArmOperandGenerator g(this); |
| 650 Int32BinopMatcher m(node); | 656 Int32BinopMatcher m(node); |
| 651 if (CanCover(node, m.left().node())) { | 657 if (CanCover(node, m.left().node())) { |
| 652 switch (m.left().opcode()) { | 658 switch (m.left().opcode()) { |
| 653 case IrOpcode::kInt32Mul: { | 659 case IrOpcode::kInt32Mul: { |
| 654 Int32BinopMatcher mleft(m.left().node()); | 660 Int32BinopMatcher mleft(m.left().node()); |
| 655 Emit(kArmMla, g.DefineAsRegister(node), | 661 Emit(kArmMla, g.DefineAsRegister(node), |
| 656 g.UseRegister(mleft.left().node()), | 662 g.UseRegister(mleft.left().node()), |
| 657 g.UseRegister(mleft.right().node()), | 663 g.UseRegister(mleft.right().node()), |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1466 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1461 MachineOperatorBuilder::kFloat64RoundTruncate | | 1467 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1462 MachineOperatorBuilder::kFloat64RoundTiesAway; | 1468 MachineOperatorBuilder::kFloat64RoundTiesAway; |
| 1463 } | 1469 } |
| 1464 return flags; | 1470 return flags; |
| 1465 } | 1471 } |
| 1466 | 1472 |
| 1467 } // namespace compiler | 1473 } // namespace compiler |
| 1468 } // namespace internal | 1474 } // namespace internal |
| 1469 } // namespace v8 | 1475 } // namespace v8 |
| OLD | NEW |