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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 void InstructionSelector::VisitFloat64Abs(Node* node) { | 1131 void InstructionSelector::VisitFloat64Abs(Node* node) { |
1132 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat64Abs, kSSEFloat64Abs); | 1132 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat64Abs, kSSEFloat64Abs); |
1133 } | 1133 } |
1134 | 1134 |
1135 | 1135 |
1136 void InstructionSelector::VisitFloat64Sqrt(Node* node) { | 1136 void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
1137 VisitRO(this, node, kSSEFloat64Sqrt); | 1137 VisitRO(this, node, kSSEFloat64Sqrt); |
1138 } | 1138 } |
1139 | 1139 |
1140 | 1140 |
| 1141 void InstructionSelector::VisitFloat32RoundDown(Node* node) { |
| 1142 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundDown)); |
| 1143 } |
| 1144 |
| 1145 |
1141 void InstructionSelector::VisitFloat64RoundDown(Node* node) { | 1146 void InstructionSelector::VisitFloat64RoundDown(Node* node) { |
1142 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundDown)); | 1147 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundDown)); |
1143 } | 1148 } |
1144 | 1149 |
1145 | 1150 |
1146 void InstructionSelector::VisitFloat64RoundUp(Node* node) { | 1151 void InstructionSelector::VisitFloat64RoundUp(Node* node) { |
1147 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp)); | 1152 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp)); |
1148 } | 1153 } |
1149 | 1154 |
1150 | 1155 |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 MachineOperatorBuilder::kWord32ShiftIsSafe | | 1692 MachineOperatorBuilder::kWord32ShiftIsSafe | |
1688 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; | 1693 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
1689 if (CpuFeatures::IsSupported(POPCNT)) { | 1694 if (CpuFeatures::IsSupported(POPCNT)) { |
1690 flags |= MachineOperatorBuilder::kWord32Popcnt | | 1695 flags |= MachineOperatorBuilder::kWord32Popcnt | |
1691 MachineOperatorBuilder::kWord64Popcnt; | 1696 MachineOperatorBuilder::kWord64Popcnt; |
1692 } | 1697 } |
1693 if (CpuFeatures::IsSupported(SSE4_1)) { | 1698 if (CpuFeatures::IsSupported(SSE4_1)) { |
1694 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1699 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1695 MachineOperatorBuilder::kFloat64RoundUp | | 1700 MachineOperatorBuilder::kFloat64RoundUp | |
1696 MachineOperatorBuilder::kFloat64RoundTruncate | | 1701 MachineOperatorBuilder::kFloat64RoundTruncate | |
1697 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1702 MachineOperatorBuilder::kFloat64RoundTiesEven | |
| 1703 MachineOperatorBuilder::kFloat32RoundDown; |
1698 } | 1704 } |
1699 return flags; | 1705 return flags; |
1700 } | 1706 } |
1701 | 1707 |
1702 } // namespace compiler | 1708 } // namespace compiler |
1703 } // namespace internal | 1709 } // namespace internal |
1704 } // namespace v8 | 1710 } // namespace v8 |
OLD | NEW |