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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 void InstructionSelector::VisitFloat32Min(Node* node) { | 752 void InstructionSelector::VisitFloat32Min(Node* node) { |
753 VisitRROFloat(this, node, kAVXFloat32Min, kSSEFloat32Min); | 753 VisitRROFloat(this, node, kAVXFloat32Min, kSSEFloat32Min); |
754 } | 754 } |
755 | 755 |
756 | 756 |
757 void InstructionSelector::VisitFloat64Min(Node* node) { | 757 void InstructionSelector::VisitFloat64Min(Node* node) { |
758 VisitRROFloat(this, node, kAVXFloat64Min, kSSEFloat64Min); | 758 VisitRROFloat(this, node, kAVXFloat64Min, kSSEFloat64Min); |
759 } | 759 } |
760 | 760 |
761 | 761 |
| 762 void InstructionSelector::VisitFloat32Abs(Node* node) { |
| 763 IA32OperandGenerator g(this); |
| 764 Emit(kSSEFloat32Abs, g.DefineSameAsFirst(node), g.Use(node->InputAt(0))); |
| 765 } |
| 766 |
| 767 |
| 768 void InstructionSelector::VisitFloat64Abs(Node* node) { |
| 769 IA32OperandGenerator g(this); |
| 770 Emit(kSSEFloat64Abs, g.DefineSameAsFirst(node), g.Use(node->InputAt(0))); |
| 771 } |
| 772 |
| 773 |
762 void InstructionSelector::VisitFloat32Sqrt(Node* node) { | 774 void InstructionSelector::VisitFloat32Sqrt(Node* node) { |
763 VisitROFloat(this, node, kSSEFloat32Sqrt); | 775 VisitROFloat(this, node, kSSEFloat32Sqrt); |
764 } | 776 } |
765 | 777 |
766 | 778 |
767 void InstructionSelector::VisitFloat64Sqrt(Node* node) { | 779 void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
768 VisitROFloat(this, node, kSSEFloat64Sqrt); | 780 VisitROFloat(this, node, kSSEFloat64Sqrt); |
769 } | 781 } |
770 | 782 |
771 | 783 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 Node* right = node->InputAt(1); | 1201 Node* right = node->InputAt(1); |
1190 Emit(kSSEFloat64InsertHighWord32, g.DefineSameAsFirst(node), | 1202 Emit(kSSEFloat64InsertHighWord32, g.DefineSameAsFirst(node), |
1191 g.UseRegister(left), g.Use(right)); | 1203 g.UseRegister(left), g.Use(right)); |
1192 } | 1204 } |
1193 | 1205 |
1194 | 1206 |
1195 // static | 1207 // static |
1196 MachineOperatorBuilder::Flags | 1208 MachineOperatorBuilder::Flags |
1197 InstructionSelector::SupportedMachineOperatorFlags() { | 1209 InstructionSelector::SupportedMachineOperatorFlags() { |
1198 MachineOperatorBuilder::Flags flags = | 1210 MachineOperatorBuilder::Flags flags = |
| 1211 MachineOperatorBuilder::kFloat32Abs | |
1199 MachineOperatorBuilder::kFloat32Max | | 1212 MachineOperatorBuilder::kFloat32Max | |
1200 MachineOperatorBuilder::kFloat32Min | | 1213 MachineOperatorBuilder::kFloat32Min | |
| 1214 MachineOperatorBuilder::kFloat64Abs | |
1201 MachineOperatorBuilder::kFloat64Max | | 1215 MachineOperatorBuilder::kFloat64Max | |
1202 MachineOperatorBuilder::kFloat64Min | | 1216 MachineOperatorBuilder::kFloat64Min | |
1203 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1217 MachineOperatorBuilder::kWord32ShiftIsSafe; |
1204 if (CpuFeatures::IsSupported(SSE4_1)) { | 1218 if (CpuFeatures::IsSupported(SSE4_1)) { |
1205 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1219 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1206 MachineOperatorBuilder::kFloat64RoundTruncate; | 1220 MachineOperatorBuilder::kFloat64RoundTruncate; |
1207 } | 1221 } |
1208 return flags; | 1222 return flags; |
1209 } | 1223 } |
1210 | 1224 |
1211 } // namespace compiler | 1225 } // namespace compiler |
1212 } // namespace internal | 1226 } // namespace internal |
1213 } // namespace v8 | 1227 } // namespace v8 |
OLD | NEW |