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 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 } | 1424 } |
1425 | 1425 |
1426 void InstructionSelector::EmitPrepareArguments( | 1426 void InstructionSelector::EmitPrepareArguments( |
1427 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, | 1427 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, |
1428 Node* node) { | 1428 Node* node) { |
1429 X64OperandGenerator g(this); | 1429 X64OperandGenerator g(this); |
1430 | 1430 |
1431 // Prepare for C function call. | 1431 // Prepare for C function call. |
1432 if (descriptor->IsCFunctionCall()) { | 1432 if (descriptor->IsCFunctionCall()) { |
1433 Emit(kArchPrepareCallCFunction | | 1433 Emit(kArchPrepareCallCFunction | |
1434 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), | 1434 MiscField::encode(static_cast<int>(descriptor->ParameterCount())), |
1435 0, nullptr, 0, nullptr); | 1435 0, nullptr, 0, nullptr); |
1436 | 1436 |
1437 // Poke any stack arguments. | 1437 // Poke any stack arguments. |
1438 for (size_t n = 0; n < arguments->size(); ++n) { | 1438 for (size_t n = 0; n < arguments->size(); ++n) { |
1439 PushParameter input = (*arguments)[n]; | 1439 PushParameter input = (*arguments)[n]; |
1440 if (input.node()) { | 1440 if (input.node()) { |
1441 int slot = static_cast<int>(n); | 1441 int slot = static_cast<int>(n); |
1442 InstructionOperand value = g.CanBeImmediate(input.node()) | 1442 InstructionOperand value = g.CanBeImmediate(input.node()) |
1443 ? g.UseImmediate(input.node()) | 1443 ? g.UseImmediate(input.node()) |
1444 : g.UseRegister(input.node()); | 1444 : g.UseRegister(input.node()); |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2136 // static | 2136 // static |
2137 MachineOperatorBuilder::AlignmentRequirements | 2137 MachineOperatorBuilder::AlignmentRequirements |
2138 InstructionSelector::AlignmentRequirements() { | 2138 InstructionSelector::AlignmentRequirements() { |
2139 return MachineOperatorBuilder::AlignmentRequirements:: | 2139 return MachineOperatorBuilder::AlignmentRequirements:: |
2140 FullUnalignedAccessSupport(); | 2140 FullUnalignedAccessSupport(); |
2141 } | 2141 } |
2142 | 2142 |
2143 } // namespace compiler | 2143 } // namespace compiler |
2144 } // namespace internal | 2144 } // namespace internal |
2145 } // namespace v8 | 2145 } // namespace v8 |
OLD | NEW |