| 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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 } | 849 } |
| 850 | 850 |
| 851 | 851 |
| 852 void InstructionSelector::VisitFloat64RoundDown(Node* node) { | 852 void InstructionSelector::VisitFloat64RoundDown(Node* node) { |
| 853 X87OperandGenerator g(this); | 853 X87OperandGenerator g(this); |
| 854 Emit(kX87Float64Round | MiscField::encode(kRoundDown), | 854 Emit(kX87Float64Round | MiscField::encode(kRoundDown), |
| 855 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); | 855 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); |
| 856 } | 856 } |
| 857 | 857 |
| 858 | 858 |
| 859 void InstructionSelector::VisitFloat32RoundUp(Node* node) { UNREACHABLE(); } | 859 void InstructionSelector::VisitFloat32RoundUp(Node* node) { |
| 860 X87OperandGenerator g(this); |
| 861 Emit(kX87Float32Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), |
| 862 g.Use(node->InputAt(0))); |
| 863 } |
| 860 | 864 |
| 861 | 865 |
| 862 void InstructionSelector::VisitFloat64RoundUp(Node* node) { | 866 void InstructionSelector::VisitFloat64RoundUp(Node* node) { |
| 863 X87OperandGenerator g(this); | 867 X87OperandGenerator g(this); |
| 864 Emit(kX87Float64Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), | 868 Emit(kX87Float64Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), |
| 865 g.Use(node->InputAt(0))); | 869 g.Use(node->InputAt(0))); |
| 866 } | 870 } |
| 867 | 871 |
| 868 | 872 |
| 869 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { | 873 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 MachineOperatorBuilder::Flags flags = | 1308 MachineOperatorBuilder::Flags flags = |
| 1305 MachineOperatorBuilder::kFloat32Max | | 1309 MachineOperatorBuilder::kFloat32Max | |
| 1306 MachineOperatorBuilder::kFloat32Min | | 1310 MachineOperatorBuilder::kFloat32Min | |
| 1307 MachineOperatorBuilder::kFloat64Max | | 1311 MachineOperatorBuilder::kFloat64Max | |
| 1308 MachineOperatorBuilder::kFloat64Min | | 1312 MachineOperatorBuilder::kFloat64Min | |
| 1309 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1313 MachineOperatorBuilder::kWord32ShiftIsSafe; |
| 1310 if (CpuFeatures::IsSupported(POPCNT)) { | 1314 if (CpuFeatures::IsSupported(POPCNT)) { |
| 1311 flags |= MachineOperatorBuilder::kWord32Popcnt; | 1315 flags |= MachineOperatorBuilder::kWord32Popcnt; |
| 1312 } | 1316 } |
| 1313 | 1317 |
| 1314 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1318 flags |= MachineOperatorBuilder::kFloat32RoundDown | |
| 1319 MachineOperatorBuilder::kFloat64RoundDown | |
| 1320 MachineOperatorBuilder::kFloat32RoundUp | |
| 1315 MachineOperatorBuilder::kFloat64RoundUp | | 1321 MachineOperatorBuilder::kFloat64RoundUp | |
| 1316 MachineOperatorBuilder::kFloat64RoundTruncate | | 1322 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1317 MachineOperatorBuilder::kFloat64RoundTiesEven | | 1323 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1318 MachineOperatorBuilder::kFloat32RoundDown; | |
| 1319 return flags; | 1324 return flags; |
| 1320 } | 1325 } |
| 1321 | 1326 |
| 1322 } // namespace compiler | 1327 } // namespace compiler |
| 1323 } // namespace internal | 1328 } // namespace internal |
| 1324 } // namespace v8 | 1329 } // namespace v8 |
| OLD | NEW |