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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 g.UseUniqueRegister(node->InputAt(2)), | 777 g.UseUniqueRegister(node->InputAt(2)), |
778 g.UseUniqueRegister(node->InputAt(3))}; | 778 g.UseUniqueRegister(node->InputAt(3))}; |
779 | 779 |
780 InstructionOperand outputs[] = { | 780 InstructionOperand outputs[] = { |
781 g.DefineAsRegister(node), | 781 g.DefineAsRegister(node), |
782 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; | 782 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
783 | 783 |
784 Emit(kArmAddPair, 2, outputs, 4, inputs); | 784 Emit(kArmAddPair, 2, outputs, 4, inputs); |
785 } | 785 } |
786 | 786 |
| 787 void InstructionSelector::VisitInt32PairSub(Node* node) { |
| 788 ArmOperandGenerator g(this); |
| 789 |
| 790 // We use UseUniqueRegister here to avoid register sharing with the output |
| 791 // register. |
| 792 InstructionOperand inputs[] = { |
| 793 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), |
| 794 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; |
| 795 |
| 796 InstructionOperand outputs[] = { |
| 797 g.DefineAsRegister(node), |
| 798 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 799 |
| 800 Emit(kArmSubPair, 2, outputs, 4, inputs); |
| 801 } |
| 802 |
787 void InstructionSelector::VisitWord32PairShl(Node* node) { | 803 void InstructionSelector::VisitWord32PairShl(Node* node) { |
788 ArmOperandGenerator g(this); | 804 ArmOperandGenerator g(this); |
789 Int32Matcher m(node->InputAt(2)); | 805 Int32Matcher m(node->InputAt(2)); |
790 InstructionOperand shift_operand; | 806 InstructionOperand shift_operand; |
791 if (m.HasValue()) { | 807 if (m.HasValue()) { |
792 shift_operand = g.UseImmediate(m.node()); | 808 shift_operand = g.UseImmediate(m.node()); |
793 } else { | 809 } else { |
794 shift_operand = g.UseUniqueRegister(m.node()); | 810 shift_operand = g.UseUniqueRegister(m.node()); |
795 } | 811 } |
796 | 812 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1768 MachineOperatorBuilder::kFloat64RoundTiesAway | |
1753 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1769 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1754 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1770 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1755 } | 1771 } |
1756 return flags; | 1772 return flags; |
1757 } | 1773 } |
1758 | 1774 |
1759 } // namespace compiler | 1775 } // namespace compiler |
1760 } // namespace internal | 1776 } // namespace internal |
1761 } // namespace v8 | 1777 } // namespace v8 |
OLD | NEW |