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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 void InstructionSelector::EmitPrepareArguments( | 1105 void InstructionSelector::EmitPrepareArguments( |
1106 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, | 1106 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, |
1107 Node* node) { | 1107 Node* node) { |
1108 X87OperandGenerator g(this); | 1108 X87OperandGenerator g(this); |
1109 | 1109 |
1110 // Prepare for C function call. | 1110 // Prepare for C function call. |
1111 if (descriptor->IsCFunctionCall()) { | 1111 if (descriptor->IsCFunctionCall()) { |
1112 InstructionOperand temps[] = {g.TempRegister()}; | 1112 InstructionOperand temps[] = {g.TempRegister()}; |
1113 size_t const temp_count = arraysize(temps); | 1113 size_t const temp_count = arraysize(temps); |
1114 Emit(kArchPrepareCallCFunction | | 1114 Emit(kArchPrepareCallCFunction | |
1115 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), | 1115 MiscField::encode(static_cast<int>(descriptor->ParameterCount())), |
1116 0, nullptr, 0, nullptr, temp_count, temps); | 1116 0, nullptr, 0, nullptr, temp_count, temps); |
1117 | 1117 |
1118 // Poke any stack arguments. | 1118 // Poke any stack arguments. |
1119 for (size_t n = 0; n < arguments->size(); ++n) { | 1119 for (size_t n = 0; n < arguments->size(); ++n) { |
1120 PushParameter input = (*arguments)[n]; | 1120 PushParameter input = (*arguments)[n]; |
1121 if (input.node()) { | 1121 if (input.node()) { |
1122 int const slot = static_cast<int>(n); | 1122 int const slot = static_cast<int>(n); |
1123 InstructionOperand value = g.CanBeImmediate(input.node()) | 1123 InstructionOperand value = g.CanBeImmediate(input.node()) |
1124 ? g.UseImmediate(input.node()) | 1124 ? g.UseImmediate(input.node()) |
1125 : g.UseRegister(input.node()); | 1125 : g.UseRegister(input.node()); |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 // static | 1709 // static |
1710 MachineOperatorBuilder::AlignmentRequirements | 1710 MachineOperatorBuilder::AlignmentRequirements |
1711 InstructionSelector::AlignmentRequirements() { | 1711 InstructionSelector::AlignmentRequirements() { |
1712 return MachineOperatorBuilder::AlignmentRequirements:: | 1712 return MachineOperatorBuilder::AlignmentRequirements:: |
1713 FullUnalignedAccessSupport(); | 1713 FullUnalignedAccessSupport(); |
1714 } | 1714 } |
1715 | 1715 |
1716 } // namespace compiler | 1716 } // namespace compiler |
1717 } // namespace internal | 1717 } // namespace internal |
1718 } // namespace v8 | 1718 } // namespace v8 |
OLD | NEW |