| 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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { | 1081 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { |
| 1082 Arm64OperandGenerator g(this); | 1082 Arm64OperandGenerator g(this); |
| 1083 Emit(kArm64Float64ToFloat32, g.DefineAsRegister(node), | 1083 Emit(kArm64Float64ToFloat32, g.DefineAsRegister(node), |
| 1084 g.UseRegister(node->InputAt(0))); | 1084 g.UseRegister(node->InputAt(0))); |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 | 1087 |
| 1088 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { | 1088 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { |
| 1089 Arm64OperandGenerator g(this); | 1089 Arm64OperandGenerator g(this); |
| 1090 Node* value = node->InputAt(0); | 1090 Node* value = node->InputAt(0); |
| 1091 if (CanCover(node, value)) { | 1091 if (CanCover(node, value) && value->InputCount() >= 2) { |
| 1092 Int64BinopMatcher m(value); | 1092 Int64BinopMatcher m(value); |
| 1093 if ((m.IsWord64Sar() && m.right().HasValue() && | 1093 if ((m.IsWord64Sar() && m.right().HasValue() && |
| 1094 (m.right().Value() == 32)) || | 1094 (m.right().Value() == 32)) || |
| 1095 (m.IsWord64Shr() && m.right().IsInRange(32, 63))) { | 1095 (m.IsWord64Shr() && m.right().IsInRange(32, 63))) { |
| 1096 Emit(kArm64Lsr, g.DefineAsRegister(node), g.UseRegister(m.left().node()), | 1096 Emit(kArm64Lsr, g.DefineAsRegister(node), g.UseRegister(m.left().node()), |
| 1097 g.UseImmediate(m.right().node())); | 1097 g.UseImmediate(m.right().node())); |
| 1098 return; | 1098 return; |
| 1099 } | 1099 } |
| 1100 } | 1100 } |
| 1101 | 1101 |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1900 MachineOperatorBuilder::kFloat64RoundTruncate | | 1900 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1901 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1901 MachineOperatorBuilder::kFloat64RoundTiesAway | |
| 1902 MachineOperatorBuilder::kWord32ShiftIsSafe | | 1902 MachineOperatorBuilder::kWord32ShiftIsSafe | |
| 1903 MachineOperatorBuilder::kInt32DivIsSafe | | 1903 MachineOperatorBuilder::kInt32DivIsSafe | |
| 1904 MachineOperatorBuilder::kUint32DivIsSafe; | 1904 MachineOperatorBuilder::kUint32DivIsSafe; |
| 1905 } | 1905 } |
| 1906 | 1906 |
| 1907 } // namespace compiler | 1907 } // namespace compiler |
| 1908 } // namespace internal | 1908 } // namespace internal |
| 1909 } // namespace v8 | 1909 } // namespace v8 |
| OLD | NEW |