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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 void InstructionSelector::VisitFloat32RoundDown(Node* node) { | 1141 void InstructionSelector::VisitFloat32RoundDown(Node* node) { |
1142 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundDown)); | 1142 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundDown)); |
1143 } | 1143 } |
1144 | 1144 |
1145 | 1145 |
1146 void InstructionSelector::VisitFloat64RoundDown(Node* node) { | 1146 void InstructionSelector::VisitFloat64RoundDown(Node* node) { |
1147 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundDown)); | 1147 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundDown)); |
1148 } | 1148 } |
1149 | 1149 |
1150 | 1150 |
| 1151 void InstructionSelector::VisitFloat32RoundUp(Node* node) { |
| 1152 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundUp)); |
| 1153 } |
| 1154 |
| 1155 |
1151 void InstructionSelector::VisitFloat64RoundUp(Node* node) { | 1156 void InstructionSelector::VisitFloat64RoundUp(Node* node) { |
1152 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp)); | 1157 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp)); |
1153 } | 1158 } |
1154 | 1159 |
1155 | 1160 |
1156 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { | 1161 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { |
1157 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); | 1162 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); |
1158 } | 1163 } |
1159 | 1164 |
1160 | 1165 |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 MachineOperatorBuilder::kFloat32Min | | 1694 MachineOperatorBuilder::kFloat32Min | |
1690 MachineOperatorBuilder::kFloat64Max | | 1695 MachineOperatorBuilder::kFloat64Max | |
1691 MachineOperatorBuilder::kFloat64Min | | 1696 MachineOperatorBuilder::kFloat64Min | |
1692 MachineOperatorBuilder::kWord32ShiftIsSafe | | 1697 MachineOperatorBuilder::kWord32ShiftIsSafe | |
1693 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; | 1698 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
1694 if (CpuFeatures::IsSupported(POPCNT)) { | 1699 if (CpuFeatures::IsSupported(POPCNT)) { |
1695 flags |= MachineOperatorBuilder::kWord32Popcnt | | 1700 flags |= MachineOperatorBuilder::kWord32Popcnt | |
1696 MachineOperatorBuilder::kWord64Popcnt; | 1701 MachineOperatorBuilder::kWord64Popcnt; |
1697 } | 1702 } |
1698 if (CpuFeatures::IsSupported(SSE4_1)) { | 1703 if (CpuFeatures::IsSupported(SSE4_1)) { |
1699 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1704 flags |= MachineOperatorBuilder::kFloat32RoundDown | |
| 1705 MachineOperatorBuilder::kFloat64RoundDown | |
| 1706 MachineOperatorBuilder::kFloat32RoundUp | |
1700 MachineOperatorBuilder::kFloat64RoundUp | | 1707 MachineOperatorBuilder::kFloat64RoundUp | |
1701 MachineOperatorBuilder::kFloat64RoundTruncate | | 1708 MachineOperatorBuilder::kFloat64RoundTruncate | |
1702 MachineOperatorBuilder::kFloat64RoundTiesEven | | 1709 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1703 MachineOperatorBuilder::kFloat32RoundDown; | |
1704 } | 1710 } |
1705 return flags; | 1711 return flags; |
1706 } | 1712 } |
1707 | 1713 |
1708 } // namespace compiler | 1714 } // namespace compiler |
1709 } // namespace internal | 1715 } // namespace internal |
1710 } // namespace v8 | 1716 } // namespace v8 |
OLD | NEW |