| 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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 void InstructionSelector::VisitFloat64Sqrt(Node* node) { | 1116 void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
| 1117 VisitRO(this, node, kSSEFloat64Sqrt); | 1117 VisitRO(this, node, kSSEFloat64Sqrt); |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 | 1120 |
| 1121 void InstructionSelector::VisitFloat64RoundDown(Node* node) { | 1121 void InstructionSelector::VisitFloat64RoundDown(Node* node) { |
| 1122 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundDown)); | 1122 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundDown)); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 | 1125 |
| 1126 void InstructionSelector::VisitFloat64RoundUp(Node* node) { |
| 1127 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp)); |
| 1128 } |
| 1129 |
| 1130 |
| 1126 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { | 1131 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { |
| 1127 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); | 1132 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); |
| 1128 } | 1133 } |
| 1129 | 1134 |
| 1130 | 1135 |
| 1131 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { | 1136 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { |
| 1132 UNREACHABLE(); | 1137 UNREACHABLE(); |
| 1133 } | 1138 } |
| 1134 | 1139 |
| 1135 | 1140 |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 MachineOperatorBuilder::kFloat64Max | | 1660 MachineOperatorBuilder::kFloat64Max | |
| 1656 MachineOperatorBuilder::kFloat64Min | | 1661 MachineOperatorBuilder::kFloat64Min | |
| 1657 MachineOperatorBuilder::kWord32ShiftIsSafe | | 1662 MachineOperatorBuilder::kWord32ShiftIsSafe | |
| 1658 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; | 1663 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
| 1659 if (CpuFeatures::IsSupported(POPCNT)) { | 1664 if (CpuFeatures::IsSupported(POPCNT)) { |
| 1660 flags |= MachineOperatorBuilder::kWord32Popcnt | | 1665 flags |= MachineOperatorBuilder::kWord32Popcnt | |
| 1661 MachineOperatorBuilder::kWord64Popcnt; | 1666 MachineOperatorBuilder::kWord64Popcnt; |
| 1662 } | 1667 } |
| 1663 if (CpuFeatures::IsSupported(SSE4_1)) { | 1668 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 1664 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1669 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1670 MachineOperatorBuilder::kFloat64RoundUp | |
| 1665 MachineOperatorBuilder::kFloat64RoundTruncate; | 1671 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 1666 } | 1672 } |
| 1667 return flags; | 1673 return flags; |
| 1668 } | 1674 } |
| 1669 | 1675 |
| 1670 } // namespace compiler | 1676 } // namespace compiler |
| 1671 } // namespace internal | 1677 } // namespace internal |
| 1672 } // namespace v8 | 1678 } // namespace v8 |
| OLD | NEW |