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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
760 Emit(kArmSbfx, g.DefineAsRegister(node), | 760 Emit(kArmSbfx, g.DefineAsRegister(node), |
761 g.UseRegister(mleft.left().node()), g.TempImmediate(sar - shl), | 761 g.UseRegister(mleft.left().node()), g.TempImmediate(sar - shl), |
762 g.TempImmediate(32 - sar)); | 762 g.TempImmediate(32 - sar)); |
763 return; | 763 return; |
764 } | 764 } |
765 } | 765 } |
766 } | 766 } |
767 VisitShift(this, node, TryMatchASR); | 767 VisitShift(this, node, TryMatchASR); |
768 } | 768 } |
769 | 769 |
770 void InstructionSelector::VisitInt32PairAdd(Node* node) { | |
771 ArmOperandGenerator g(this); | |
772 | |
773 // We use UseUniqueRegister here to avoid register sharing with the temp | |
774 // register. | |
jbramley
2016/03/11 09:17:05
In the comment: "... with the output registers."
ahaas
2016/03/14 11:07:50
Done.
| |
775 InstructionOperand inputs[] = {g.UseUniqueRegister(node->InputAt(0)), | |
776 g.UseUniqueRegister(node->InputAt(1)), | |
777 g.UseUniqueRegister(node->InputAt(2)), | |
778 g.UseUniqueRegister(node->InputAt(3))}; | |
jbramley
2016/03/11 09:17:05
I don't think inputs 0 and 2 have to be unique, si
ahaas
2016/03/14 11:07:50
Done.
| |
779 | |
780 InstructionOperand outputs[] = { | |
781 g.DefineAsRegister(node), | |
782 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; | |
783 | |
784 Emit(kArmAddPair, 2, outputs, 4, inputs); | |
785 } | |
786 | |
770 void InstructionSelector::VisitWord32PairShl(Node* node) { | 787 void InstructionSelector::VisitWord32PairShl(Node* node) { |
771 ArmOperandGenerator g(this); | 788 ArmOperandGenerator g(this); |
772 Int32Matcher m(node->InputAt(2)); | 789 Int32Matcher m(node->InputAt(2)); |
773 InstructionOperand shift_operand; | 790 InstructionOperand shift_operand; |
774 if (m.HasValue()) { | 791 if (m.HasValue()) { |
775 shift_operand = g.UseImmediate(m.node()); | 792 shift_operand = g.UseImmediate(m.node()); |
776 } else { | 793 } else { |
777 shift_operand = g.UseUniqueRegister(m.node()); | 794 shift_operand = g.UseUniqueRegister(m.node()); |
778 } | 795 } |
779 | 796 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1735 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1752 MachineOperatorBuilder::kFloat64RoundTiesAway | |
1736 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1753 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1737 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1754 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1738 } | 1755 } |
1739 return flags; | 1756 return flags; |
1740 } | 1757 } |
1741 | 1758 |
1742 } // namespace compiler | 1759 } // namespace compiler |
1743 } // namespace internal | 1760 } // namespace internal |
1744 } // namespace v8 | 1761 } // namespace v8 |
OLD | NEW |