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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 break; | 911 break; |
912 } | 912 } |
913 default: | 913 default: |
914 break; | 914 break; |
915 } | 915 } |
916 } | 916 } |
917 Emit(kX64Movl, g.DefineAsRegister(node), g.Use(value)); | 917 Emit(kX64Movl, g.DefineAsRegister(node), g.Use(value)); |
918 } | 918 } |
919 | 919 |
920 | 920 |
| 921 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) { |
| 922 X64OperandGenerator g(this); |
| 923 Emit(kSSEInt64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 924 } |
| 925 |
| 926 |
921 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { | 927 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { |
922 X64OperandGenerator g(this); | 928 X64OperandGenerator g(this); |
923 Emit(kX64BitcastFI, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 929 Emit(kX64BitcastFI, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
924 } | 930 } |
925 | 931 |
926 | 932 |
927 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { | 933 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { |
928 X64OperandGenerator g(this); | 934 X64OperandGenerator g(this); |
929 Emit(kX64BitcastDL, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 935 Emit(kX64BitcastDL, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
930 } | 936 } |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 if (CpuFeatures::IsSupported(SSE4_1)) { | 1607 if (CpuFeatures::IsSupported(SSE4_1)) { |
1602 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1608 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1603 MachineOperatorBuilder::kFloat64RoundTruncate; | 1609 MachineOperatorBuilder::kFloat64RoundTruncate; |
1604 } | 1610 } |
1605 return flags; | 1611 return flags; |
1606 } | 1612 } |
1607 | 1613 |
1608 } // namespace compiler | 1614 } // namespace compiler |
1609 } // namespace internal | 1615 } // namespace internal |
1610 } // namespace v8 | 1616 } // namespace v8 |
OLD | NEW |