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::VisitFloat64RoundTruncate(Node* node) { | 1131 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { |
1132 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); | 1132 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); |
1133 } | 1133 } |
1134 | 1134 |
1135 | 1135 |
1136 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { | 1136 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { |
1137 UNREACHABLE(); | 1137 UNREACHABLE(); |
1138 } | 1138 } |
1139 | 1139 |
1140 | 1140 |
| 1141 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { |
| 1142 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest)); |
| 1143 } |
| 1144 |
| 1145 |
1141 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, | 1146 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, |
1142 const CallDescriptor* descriptor, | 1147 const CallDescriptor* descriptor, |
1143 Node* node) { | 1148 Node* node) { |
1144 X64OperandGenerator g(this); | 1149 X64OperandGenerator g(this); |
1145 | 1150 |
1146 // Prepare for C function call. | 1151 // Prepare for C function call. |
1147 if (descriptor->IsCFunctionCall()) { | 1152 if (descriptor->IsCFunctionCall()) { |
1148 Emit(kArchPrepareCallCFunction | | 1153 Emit(kArchPrepareCallCFunction | |
1149 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), | 1154 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), |
1150 0, nullptr, 0, nullptr); | 1155 0, nullptr, 0, nullptr); |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 MachineOperatorBuilder::kFloat64Min | | 1666 MachineOperatorBuilder::kFloat64Min | |
1662 MachineOperatorBuilder::kWord32ShiftIsSafe | | 1667 MachineOperatorBuilder::kWord32ShiftIsSafe | |
1663 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; | 1668 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
1664 if (CpuFeatures::IsSupported(POPCNT)) { | 1669 if (CpuFeatures::IsSupported(POPCNT)) { |
1665 flags |= MachineOperatorBuilder::kWord32Popcnt | | 1670 flags |= MachineOperatorBuilder::kWord32Popcnt | |
1666 MachineOperatorBuilder::kWord64Popcnt; | 1671 MachineOperatorBuilder::kWord64Popcnt; |
1667 } | 1672 } |
1668 if (CpuFeatures::IsSupported(SSE4_1)) { | 1673 if (CpuFeatures::IsSupported(SSE4_1)) { |
1669 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1674 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1670 MachineOperatorBuilder::kFloat64RoundUp | | 1675 MachineOperatorBuilder::kFloat64RoundUp | |
1671 MachineOperatorBuilder::kFloat64RoundTruncate; | 1676 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1677 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1672 } | 1678 } |
1673 return flags; | 1679 return flags; |
1674 } | 1680 } |
1675 | 1681 |
1676 } // namespace compiler | 1682 } // namespace compiler |
1677 } // namespace internal | 1683 } // namespace internal |
1678 } // namespace v8 | 1684 } // namespace v8 |
OLD | NEW |