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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 IA32OperandGenerator g(this); | 1007 IA32OperandGenerator g(this); |
1008 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat32Abs, kSSEFloat32Abs); | 1008 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat32Abs, kSSEFloat32Abs); |
1009 } | 1009 } |
1010 | 1010 |
1011 | 1011 |
1012 void InstructionSelector::VisitFloat64Abs(Node* node) { | 1012 void InstructionSelector::VisitFloat64Abs(Node* node) { |
1013 IA32OperandGenerator g(this); | 1013 IA32OperandGenerator g(this); |
1014 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat64Abs, kSSEFloat64Abs); | 1014 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat64Abs, kSSEFloat64Abs); |
1015 } | 1015 } |
1016 | 1016 |
1017 void InstructionSelector::VisitFloat64Log(Node* node) { | |
1018 IA32OperandGenerator g(this); | |
1019 Emit(kIeee754Float64Log, g.DefineSameAsFirst(node), | |
1020 g.UseRegister(node->InputAt(0))) | |
1021 ->MarkAsCall(); | |
1022 } | |
1023 | |
1024 void InstructionSelector::VisitFloat32Sqrt(Node* node) { | 1017 void InstructionSelector::VisitFloat32Sqrt(Node* node) { |
1025 VisitRO(this, node, kSSEFloat32Sqrt); | 1018 VisitRO(this, node, kSSEFloat32Sqrt); |
1026 } | 1019 } |
1027 | 1020 |
1028 | 1021 |
1029 void InstructionSelector::VisitFloat64Sqrt(Node* node) { | 1022 void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
1030 VisitRO(this, node, kSSEFloat64Sqrt); | 1023 VisitRO(this, node, kSSEFloat64Sqrt); |
1031 } | 1024 } |
1032 | 1025 |
1033 | 1026 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 | 1065 |
1073 | 1066 |
1074 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { | 1067 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { |
1075 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest)); | 1068 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest)); |
1076 } | 1069 } |
1077 | 1070 |
1078 void InstructionSelector::VisitFloat32Neg(Node* node) { UNREACHABLE(); } | 1071 void InstructionSelector::VisitFloat32Neg(Node* node) { UNREACHABLE(); } |
1079 | 1072 |
1080 void InstructionSelector::VisitFloat64Neg(Node* node) { UNREACHABLE(); } | 1073 void InstructionSelector::VisitFloat64Neg(Node* node) { UNREACHABLE(); } |
1081 | 1074 |
| 1075 void InstructionSelector::VisitFloat64Ieee754Unop(Node* node, |
| 1076 InstructionCode opcode) { |
| 1077 IA32OperandGenerator g(this); |
| 1078 Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))) |
| 1079 ->MarkAsCall(); |
| 1080 } |
| 1081 |
1082 void InstructionSelector::EmitPrepareArguments( | 1082 void InstructionSelector::EmitPrepareArguments( |
1083 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, | 1083 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, |
1084 Node* node) { | 1084 Node* node) { |
1085 IA32OperandGenerator g(this); | 1085 IA32OperandGenerator g(this); |
1086 | 1086 |
1087 // Prepare for C function call. | 1087 // Prepare for C function call. |
1088 if (descriptor->IsCFunctionCall()) { | 1088 if (descriptor->IsCFunctionCall()) { |
1089 InstructionOperand temps[] = {g.TempRegister()}; | 1089 InstructionOperand temps[] = {g.TempRegister()}; |
1090 size_t const temp_count = arraysize(temps); | 1090 size_t const temp_count = arraysize(temps); |
1091 Emit(kArchPrepareCallCFunction | | 1091 Emit(kArchPrepareCallCFunction | |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1668 // static | 1668 // static |
1669 MachineOperatorBuilder::AlignmentRequirements | 1669 MachineOperatorBuilder::AlignmentRequirements |
1670 InstructionSelector::AlignmentRequirements() { | 1670 InstructionSelector::AlignmentRequirements() { |
1671 return MachineOperatorBuilder::AlignmentRequirements:: | 1671 return MachineOperatorBuilder::AlignmentRequirements:: |
1672 FullUnalignedAccessSupport(); | 1672 FullUnalignedAccessSupport(); |
1673 } | 1673 } |
1674 | 1674 |
1675 } // namespace compiler | 1675 } // namespace compiler |
1676 } // namespace internal | 1676 } // namespace internal |
1677 } // namespace v8 | 1677 } // namespace v8 |
OLD | NEW |