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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 case TruncationMode::kRoundToZero: | 658 case TruncationMode::kRoundToZero: |
659 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), | 659 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), |
660 g.Use(node->InputAt(0))); | 660 g.Use(node->InputAt(0))); |
661 return; | 661 return; |
662 } | 662 } |
663 UNREACHABLE(); | 663 UNREACHABLE(); |
664 } | 664 } |
665 | 665 |
666 | 666 |
667 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { | 667 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { |
668 UNIMPLEMENTED(); | 668 X87OperandGenerator g(this); |
| 669 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); |
| 670 Emit(kX87BitcastFI, g.DefineAsRegister(node), 0, NULL); |
669 } | 671 } |
670 | 672 |
671 | 673 |
672 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { | 674 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { |
673 UNIMPLEMENTED(); | 675 X87OperandGenerator g(this); |
| 676 Emit(kX87BitcastIF, g.DefineAsFixed(node, stX_0), g.Use(node->InputAt(0))); |
674 } | 677 } |
675 | 678 |
676 | 679 |
677 void InstructionSelector::VisitFloat32Add(Node* node) { | 680 void InstructionSelector::VisitFloat32Add(Node* node) { |
678 X87OperandGenerator g(this); | 681 X87OperandGenerator g(this); |
679 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); | 682 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); |
680 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); | 683 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); |
681 Emit(kX87Float32Add, g.DefineAsFixed(node, stX_0), 0, NULL); | 684 Emit(kX87Float32Add, g.DefineAsFixed(node, stX_0), 0, NULL); |
682 } | 685 } |
683 | 686 |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 MachineOperatorBuilder::kFloat32Min | | 1364 MachineOperatorBuilder::kFloat32Min | |
1362 MachineOperatorBuilder::kFloat64Max | | 1365 MachineOperatorBuilder::kFloat64Max | |
1363 MachineOperatorBuilder::kFloat64Min | | 1366 MachineOperatorBuilder::kFloat64Min | |
1364 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1367 MachineOperatorBuilder::kWord32ShiftIsSafe; |
1365 return flags; | 1368 return flags; |
1366 } | 1369 } |
1367 | 1370 |
1368 } // namespace compiler | 1371 } // namespace compiler |
1369 } // namespace internal | 1372 } // namespace internal |
1370 } // namespace v8 | 1373 } // namespace v8 |
OLD | NEW |