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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 } | 890 } |
891 | 891 |
892 | 892 |
893 void InstructionSelector::VisitFloat32Sub(Node* node) { | 893 void InstructionSelector::VisitFloat32Sub(Node* node) { |
894 X87OperandGenerator g(this); | 894 X87OperandGenerator g(this); |
895 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); | 895 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); |
896 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); | 896 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); |
897 Emit(kX87Float32Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); | 897 Emit(kX87Float32Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); |
898 } | 898 } |
899 | 899 |
| 900 void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) { |
| 901 X87OperandGenerator g(this); |
| 902 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); |
| 903 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); |
| 904 Emit(kX87Float32Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); |
| 905 } |
900 | 906 |
901 void InstructionSelector::VisitFloat64Sub(Node* node) { | 907 void InstructionSelector::VisitFloat64Sub(Node* node) { |
902 X87OperandGenerator g(this); | 908 X87OperandGenerator g(this); |
903 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); | 909 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); |
904 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); | 910 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); |
905 Emit(kX87Float64Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); | 911 Emit(kX87Float64Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); |
906 } | 912 } |
907 | 913 |
| 914 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) { |
| 915 X87OperandGenerator g(this); |
| 916 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); |
| 917 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); |
| 918 Emit(kX87Float64Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); |
| 919 } |
| 920 |
908 | 921 |
909 void InstructionSelector::VisitFloat32Mul(Node* node) { | 922 void InstructionSelector::VisitFloat32Mul(Node* node) { |
910 X87OperandGenerator g(this); | 923 X87OperandGenerator g(this); |
911 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); | 924 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); |
912 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); | 925 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); |
913 Emit(kX87Float32Mul, g.DefineAsFixed(node, stX_0), 0, nullptr); | 926 Emit(kX87Float32Mul, g.DefineAsFixed(node, stX_0), 0, nullptr); |
914 } | 927 } |
915 | 928 |
916 | 929 |
917 void InstructionSelector::VisitFloat64Mul(Node* node) { | 930 void InstructionSelector::VisitFloat64Mul(Node* node) { |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1701 MachineOperatorBuilder::kFloat32RoundTruncate | | 1714 MachineOperatorBuilder::kFloat32RoundTruncate | |
1702 MachineOperatorBuilder::kFloat64RoundTruncate | | 1715 MachineOperatorBuilder::kFloat64RoundTruncate | |
1703 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1716 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1704 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1717 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1705 return flags; | 1718 return flags; |
1706 } | 1719 } |
1707 | 1720 |
1708 } // namespace compiler | 1721 } // namespace compiler |
1709 } // namespace internal | 1722 } // namespace internal |
1710 } // namespace v8 | 1723 } // namespace v8 |
OLD | NEW |