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/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 853 matching lines...) Loading... |
864 | 864 |
865 | 865 |
866 void InstructionSelector::VisitFloat64RoundUp(Node* node) { | 866 void InstructionSelector::VisitFloat64RoundUp(Node* node) { |
867 X87OperandGenerator g(this); | 867 X87OperandGenerator g(this); |
868 Emit(kX87Float64Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), | 868 Emit(kX87Float64Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), |
869 g.Use(node->InputAt(0))); | 869 g.Use(node->InputAt(0))); |
870 } | 870 } |
871 | 871 |
872 | 872 |
873 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { | 873 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { |
874 UNREACHABLE(); | 874 X87OperandGenerator g(this); |
| 875 Emit(kX87Float32Round | MiscField::encode(kRoundToZero), |
| 876 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); |
875 } | 877 } |
876 | 878 |
877 | 879 |
878 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { | 880 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { |
879 X87OperandGenerator g(this); | 881 X87OperandGenerator g(this); |
880 Emit(kX87Float64Round | MiscField::encode(kRoundToZero), | 882 Emit(kX87Float64Round | MiscField::encode(kRoundToZero), |
881 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); | 883 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); |
882 } | 884 } |
883 | 885 |
884 | 886 |
(...skipping 427 matching lines...) Loading... |
1312 MachineOperatorBuilder::kFloat64Min | | 1314 MachineOperatorBuilder::kFloat64Min | |
1313 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1315 MachineOperatorBuilder::kWord32ShiftIsSafe; |
1314 if (CpuFeatures::IsSupported(POPCNT)) { | 1316 if (CpuFeatures::IsSupported(POPCNT)) { |
1315 flags |= MachineOperatorBuilder::kWord32Popcnt; | 1317 flags |= MachineOperatorBuilder::kWord32Popcnt; |
1316 } | 1318 } |
1317 | 1319 |
1318 flags |= MachineOperatorBuilder::kFloat32RoundDown | | 1320 flags |= MachineOperatorBuilder::kFloat32RoundDown | |
1319 MachineOperatorBuilder::kFloat64RoundDown | | 1321 MachineOperatorBuilder::kFloat64RoundDown | |
1320 MachineOperatorBuilder::kFloat32RoundUp | | 1322 MachineOperatorBuilder::kFloat32RoundUp | |
1321 MachineOperatorBuilder::kFloat64RoundUp | | 1323 MachineOperatorBuilder::kFloat64RoundUp | |
| 1324 MachineOperatorBuilder::kFloat32RoundTruncate | |
1322 MachineOperatorBuilder::kFloat64RoundTruncate | | 1325 MachineOperatorBuilder::kFloat64RoundTruncate | |
1323 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1326 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1324 return flags; | 1327 return flags; |
1325 } | 1328 } |
1326 | 1329 |
1327 } // namespace compiler | 1330 } // namespace compiler |
1328 } // namespace internal | 1331 } // namespace internal |
1329 } // namespace v8 | 1332 } // namespace v8 |
OLD | NEW |