| 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/adapters.h" | 5 #include "src/base/adapters.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 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
| 10 | 10 |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 #endif | 767 #endif |
| 768 | 768 |
| 769 | 769 |
| 770 void InstructionSelector::VisitWord32Popcnt(Node* node) { | 770 void InstructionSelector::VisitWord32Popcnt(Node* node) { |
| 771 PPCOperandGenerator g(this); | 771 PPCOperandGenerator g(this); |
| 772 Emit(kPPC_Popcnt32, g.DefineAsRegister(node), | 772 Emit(kPPC_Popcnt32, g.DefineAsRegister(node), |
| 773 g.UseRegister(node->InputAt(0))); | 773 g.UseRegister(node->InputAt(0))); |
| 774 } | 774 } |
| 775 | 775 |
| 776 | 776 |
| 777 #if V8_TARGET_ARCH_PPC64 |
| 778 void InstructionSelector::VisitWord64Popcnt(Node* node) { |
| 779 PPCOperandGenerator g(this); |
| 780 Emit(kPPC_Popcnt64, g.DefineAsRegister(node), |
| 781 g.UseRegister(node->InputAt(0))); |
| 782 } |
| 783 #endif |
| 784 |
| 785 |
| 777 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } | 786 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } |
| 778 | 787 |
| 779 | 788 |
| 780 #if V8_TARGET_ARCH_PPC64 | 789 #if V8_TARGET_ARCH_PPC64 |
| 781 void InstructionSelector::VisitWord64Ctz(Node* node) { UNREACHABLE(); } | 790 void InstructionSelector::VisitWord64Ctz(Node* node) { UNREACHABLE(); } |
| 782 #endif | 791 #endif |
| 783 | 792 |
| 784 | 793 |
| 785 void InstructionSelector::VisitInt32Add(Node* node) { | 794 void InstructionSelector::VisitInt32Add(Node* node) { |
| 786 VisitBinop<Int32BinopMatcher>(this, node, kPPC_Add, kInt16Imm); | 795 VisitBinop<Int32BinopMatcher>(this, node, kPPC_Add, kInt16Imm); |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 g.UseRegister(left), g.UseRegister(right)); | 1618 g.UseRegister(left), g.UseRegister(right)); |
| 1610 } | 1619 } |
| 1611 | 1620 |
| 1612 | 1621 |
| 1613 // static | 1622 // static |
| 1614 MachineOperatorBuilder::Flags | 1623 MachineOperatorBuilder::Flags |
| 1615 InstructionSelector::SupportedMachineOperatorFlags() { | 1624 InstructionSelector::SupportedMachineOperatorFlags() { |
| 1616 return MachineOperatorBuilder::kFloat64RoundDown | | 1625 return MachineOperatorBuilder::kFloat64RoundDown | |
| 1617 MachineOperatorBuilder::kFloat64RoundTruncate | | 1626 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1618 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1627 MachineOperatorBuilder::kFloat64RoundTiesAway | |
| 1619 MachineOperatorBuilder::kWord32Popcnt; | 1628 MachineOperatorBuilder::kWord32Popcnt | |
| 1629 MachineOperatorBuilder::kWord64Popcnt; |
| 1620 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1630 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
| 1621 } | 1631 } |
| 1622 | 1632 |
| 1623 } // namespace compiler | 1633 } // namespace compiler |
| 1624 } // namespace internal | 1634 } // namespace internal |
| 1625 } // namespace v8 | 1635 } // namespace v8 |
| OLD | NEW |