| 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/base/bits.h" | 6 #include "src/base/bits.h" |
| 7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 g.UseRegister(node->InputAt(1)), | 800 g.UseRegister(node->InputAt(1)), |
| 801 shift_operand}; | 801 shift_operand}; |
| 802 | 802 |
| 803 InstructionOperand outputs[] = { | 803 InstructionOperand outputs[] = { |
| 804 g.DefineAsRegister(node), | 804 g.DefineAsRegister(node), |
| 805 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; | 805 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 806 | 806 |
| 807 Emit(kArmLslPair, 2, outputs, 3, inputs); | 807 Emit(kArmLslPair, 2, outputs, 3, inputs); |
| 808 } | 808 } |
| 809 | 809 |
| 810 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } | 810 void InstructionSelector::VisitWord32PairShr(Node* node) { |
| 811 ArmOperandGenerator g(this); |
| 812 // We use g.UseUniqueRegister here for InputAt(1) and InputAt(2) to to |
| 813 // guarantee that there is no register aliasing with output register. |
| 814 Int32Matcher m(node->InputAt(2)); |
| 815 InstructionOperand shift_operand; |
| 816 if (m.HasValue()) { |
| 817 shift_operand = g.UseImmediate(m.node()); |
| 818 } else { |
| 819 shift_operand = g.UseUniqueRegister(m.node()); |
| 820 } |
| 811 | 821 |
| 812 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } | 822 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)), |
| 823 g.UseUniqueRegister(node->InputAt(1)), |
| 824 shift_operand}; |
| 825 |
| 826 InstructionOperand outputs[] = { |
| 827 g.DefineAsRegister(node), |
| 828 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 829 |
| 830 Emit(kArmLsrPair, 2, outputs, 3, inputs); |
| 831 } |
| 832 |
| 833 void InstructionSelector::VisitWord32PairSar(Node* node) { |
| 834 ArmOperandGenerator g(this); |
| 835 // We use g.UseUniqueRegister here for InputAt(1) and InputAt(2) to to |
| 836 // guarantee that there is no register aliasing with output register. |
| 837 Int32Matcher m(node->InputAt(2)); |
| 838 InstructionOperand shift_operand; |
| 839 if (m.HasValue()) { |
| 840 shift_operand = g.UseImmediate(m.node()); |
| 841 } else { |
| 842 shift_operand = g.UseUniqueRegister(m.node()); |
| 843 } |
| 844 |
| 845 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)), |
| 846 g.UseUniqueRegister(node->InputAt(1)), |
| 847 shift_operand}; |
| 848 |
| 849 InstructionOperand outputs[] = { |
| 850 g.DefineAsRegister(node), |
| 851 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 852 |
| 853 Emit(kArmAsrPair, 2, outputs, 3, inputs); |
| 854 } |
| 813 | 855 |
| 814 void InstructionSelector::VisitWord32Ror(Node* node) { | 856 void InstructionSelector::VisitWord32Ror(Node* node) { |
| 815 VisitShift(this, node, TryMatchROR); | 857 VisitShift(this, node, TryMatchROR); |
| 816 } | 858 } |
| 817 | 859 |
| 818 | 860 |
| 819 void InstructionSelector::VisitWord32Clz(Node* node) { | 861 void InstructionSelector::VisitWord32Clz(Node* node) { |
| 820 VisitRR(this, kArmClz, node); | 862 VisitRR(this, kArmClz, node); |
| 821 } | 863 } |
| 822 | 864 |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1796 MachineOperatorBuilder::kFloat64RoundTiesAway | |
| 1755 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1797 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 1756 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1798 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1757 } | 1799 } |
| 1758 return flags; | 1800 return flags; |
| 1759 } | 1801 } |
| 1760 | 1802 |
| 1761 } // namespace compiler | 1803 } // namespace compiler |
| 1762 } // namespace internal | 1804 } // namespace internal |
| 1763 } // namespace v8 | 1805 } // namespace v8 |
| OLD | NEW |