| 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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
| 6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
| 7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 VisitRRO(this, kArm64Ror, node, kShift64Imm); | 911 VisitRRO(this, kArm64Ror, node, kShift64Imm); |
| 912 } | 912 } |
| 913 | 913 |
| 914 | 914 |
| 915 void InstructionSelector::VisitWord32Clz(Node* node) { | 915 void InstructionSelector::VisitWord32Clz(Node* node) { |
| 916 Arm64OperandGenerator g(this); | 916 Arm64OperandGenerator g(this); |
| 917 Emit(kArm64Clz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); | 917 Emit(kArm64Clz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
| 918 } | 918 } |
| 919 | 919 |
| 920 | 920 |
| 921 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } |
| 922 |
| 923 |
| 921 void InstructionSelector::VisitInt32Add(Node* node) { | 924 void InstructionSelector::VisitInt32Add(Node* node) { |
| 922 Arm64OperandGenerator g(this); | 925 Arm64OperandGenerator g(this); |
| 923 Int32BinopMatcher m(node); | 926 Int32BinopMatcher m(node); |
| 924 // Select Madd(x, y, z) for Add(Mul(x, y), z). | 927 // Select Madd(x, y, z) for Add(Mul(x, y), z). |
| 925 if (m.left().IsInt32Mul() && CanCover(node, m.left().node())) { | 928 if (m.left().IsInt32Mul() && CanCover(node, m.left().node())) { |
| 926 Int32BinopMatcher mleft(m.left().node()); | 929 Int32BinopMatcher mleft(m.left().node()); |
| 927 // Check multiply can't be later reduced to addition with shift. | 930 // Check multiply can't be later reduced to addition with shift. |
| 928 if (LeftShiftForReducedMultiply(&mleft) == 0) { | 931 if (LeftShiftForReducedMultiply(&mleft) == 0) { |
| 929 Emit(kArm64Madd32, g.DefineAsRegister(node), | 932 Emit(kArm64Madd32, g.DefineAsRegister(node), |
| 930 g.UseRegister(mleft.left().node()), | 933 g.UseRegister(mleft.left().node()), |
| (...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2111 MachineOperatorBuilder::kFloat64RoundTruncate | | 2114 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 2112 MachineOperatorBuilder::kFloat64RoundTiesAway | | 2115 MachineOperatorBuilder::kFloat64RoundTiesAway | |
| 2113 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2116 MachineOperatorBuilder::kWord32ShiftIsSafe | |
| 2114 MachineOperatorBuilder::kInt32DivIsSafe | | 2117 MachineOperatorBuilder::kInt32DivIsSafe | |
| 2115 MachineOperatorBuilder::kUint32DivIsSafe; | 2118 MachineOperatorBuilder::kUint32DivIsSafe; |
| 2116 } | 2119 } |
| 2117 | 2120 |
| 2118 } // namespace compiler | 2121 } // namespace compiler |
| 2119 } // namespace internal | 2122 } // namespace internal |
| 2120 } // namespace v8 | 2123 } // namespace v8 |
| OLD | NEW |