| 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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 return; | 780 return; |
| 781 } else if (mleft.right().Is(24) && m.right().Is(24)) { | 781 } else if (mleft.right().Is(24) && m.right().Is(24)) { |
| 782 Emit(kPPC_ExtendSignWord8, g.DefineAsRegister(node), | 782 Emit(kPPC_ExtendSignWord8, g.DefineAsRegister(node), |
| 783 g.UseRegister(mleft.left().node())); | 783 g.UseRegister(mleft.left().node())); |
| 784 return; | 784 return; |
| 785 } | 785 } |
| 786 } | 786 } |
| 787 VisitRRO(this, kPPC_ShiftRightAlg32, node, kShift32Imm); | 787 VisitRRO(this, kPPC_ShiftRightAlg32, node, kShift32Imm); |
| 788 } | 788 } |
| 789 | 789 |
| 790 #if !V8_TARGET_ARCH_PPC64 |
| 791 void InstructionSelector::VisitWord32PairShl(Node* node) { |
| 792 PPCOperandGenerator g(this); |
| 793 Int32Matcher m(node->InputAt(2)); |
| 794 InstructionOperand shift_operand; |
| 795 if (m.HasValue()) { |
| 796 shift_operand = g.UseImmediate(m.node()); |
| 797 } else { |
| 798 shift_operand = g.UseUniqueRegister(m.node()); |
| 799 } |
| 800 |
| 801 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)), |
| 802 g.UseRegister(node->InputAt(1)), |
| 803 shift_operand}; |
| 804 |
| 805 InstructionOperand outputs[] = { |
| 806 g.DefineSameAsFirst(node), |
| 807 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 808 |
| 809 Emit(kPPC_PairShiftLeft, 2, outputs, 3, inputs); |
| 810 } |
| 811 #endif |
| 790 | 812 |
| 791 #if V8_TARGET_ARCH_PPC64 | 813 #if V8_TARGET_ARCH_PPC64 |
| 792 void InstructionSelector::VisitWord64Sar(Node* node) { | 814 void InstructionSelector::VisitWord64Sar(Node* node) { |
| 793 VisitRRO(this, kPPC_ShiftRightAlg64, node, kShift64Imm); | 815 VisitRRO(this, kPPC_ShiftRightAlg64, node, kShift64Imm); |
| 794 } | 816 } |
| 795 #endif | 817 #endif |
| 796 | 818 |
| 797 | 819 |
| 798 // TODO(mbrandy): Absorb logical-and into rlwinm? | 820 // TODO(mbrandy): Absorb logical-and into rlwinm? |
| 799 void InstructionSelector::VisitWord32Ror(Node* node) { | 821 void InstructionSelector::VisitWord32Ror(Node* node) { |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1833 MachineOperatorBuilder::kFloat64RoundTruncate | | 1855 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1834 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1856 MachineOperatorBuilder::kFloat64RoundTiesAway | |
| 1835 MachineOperatorBuilder::kWord32Popcnt | | 1857 MachineOperatorBuilder::kWord32Popcnt | |
| 1836 MachineOperatorBuilder::kWord64Popcnt; | 1858 MachineOperatorBuilder::kWord64Popcnt; |
| 1837 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1859 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
| 1838 } | 1860 } |
| 1839 | 1861 |
| 1840 } // namespace compiler | 1862 } // namespace compiler |
| 1841 } // namespace internal | 1863 } // namespace internal |
| 1842 } // namespace v8 | 1864 } // namespace v8 |
| OLD | NEW |