| 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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 void InstructionSelector::EmitPrepareArguments( | 1090 void InstructionSelector::EmitPrepareArguments( |
| 1091 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, | 1091 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, |
| 1092 Node* node) { | 1092 Node* node) { |
| 1093 IA32OperandGenerator g(this); | 1093 IA32OperandGenerator g(this); |
| 1094 | 1094 |
| 1095 // Prepare for C function call. | 1095 // Prepare for C function call. |
| 1096 if (descriptor->IsCFunctionCall()) { | 1096 if (descriptor->IsCFunctionCall()) { |
| 1097 InstructionOperand temps[] = {g.TempRegister()}; | 1097 InstructionOperand temps[] = {g.TempRegister()}; |
| 1098 size_t const temp_count = arraysize(temps); | 1098 size_t const temp_count = arraysize(temps); |
| 1099 Emit(kArchPrepareCallCFunction | | 1099 Emit(kArchPrepareCallCFunction | |
| 1100 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), | 1100 MiscField::encode(static_cast<int>(descriptor->ParameterCount())), |
| 1101 0, nullptr, 0, nullptr, temp_count, temps); | 1101 0, nullptr, 0, nullptr, temp_count, temps); |
| 1102 | 1102 |
| 1103 // Poke any stack arguments. | 1103 // Poke any stack arguments. |
| 1104 for (size_t n = 0; n < arguments->size(); ++n) { | 1104 for (size_t n = 0; n < arguments->size(); ++n) { |
| 1105 PushParameter input = (*arguments)[n]; | 1105 PushParameter input = (*arguments)[n]; |
| 1106 if (input.node()) { | 1106 if (input.node()) { |
| 1107 int const slot = static_cast<int>(n); | 1107 int const slot = static_cast<int>(n); |
| 1108 InstructionOperand value = g.CanBeImmediate(node) | 1108 InstructionOperand value = g.CanBeImmediate(node) |
| 1109 ? g.UseImmediate(input.node()) | 1109 ? g.UseImmediate(input.node()) |
| 1110 : g.UseRegister(input.node()); | 1110 : g.UseRegister(input.node()); |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 // static | 1682 // static |
| 1683 MachineOperatorBuilder::AlignmentRequirements | 1683 MachineOperatorBuilder::AlignmentRequirements |
| 1684 InstructionSelector::AlignmentRequirements() { | 1684 InstructionSelector::AlignmentRequirements() { |
| 1685 return MachineOperatorBuilder::AlignmentRequirements:: | 1685 return MachineOperatorBuilder::AlignmentRequirements:: |
| 1686 FullUnalignedAccessSupport(); | 1686 FullUnalignedAccessSupport(); |
| 1687 } | 1687 } |
| 1688 | 1688 |
| 1689 } // namespace compiler | 1689 } // namespace compiler |
| 1690 } // namespace internal | 1690 } // namespace internal |
| 1691 } // namespace v8 | 1691 } // namespace v8 |
| OLD | NEW |