| 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/base/bits.h" | 6 #include "src/base/bits.h" |
| 7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 // Compute InstructionOperands for inputs and outputs. | 675 // Compute InstructionOperands for inputs and outputs. |
| 676 InitializeCallBuffer(node, &buffer, true, true); | 676 InitializeCallBuffer(node, &buffer, true, true); |
| 677 | 677 |
| 678 // Prepare for C function call. | 678 // Prepare for C function call. |
| 679 if (descriptor->IsCFunctionCall()) { | 679 if (descriptor->IsCFunctionCall()) { |
| 680 Emit(kArchPrepareCallCFunction | | 680 Emit(kArchPrepareCallCFunction | |
| 681 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), | 681 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), |
| 682 0, nullptr, 0, nullptr); | 682 0, nullptr, 0, nullptr); |
| 683 | 683 |
| 684 // Poke any stack arguments. | 684 // Poke any stack arguments. |
| 685 int slot = kCArgSlotCount; | 685 for (size_t n = 0; n < buffer.pushed_nodes.size(); ++n) { |
| 686 for (Node* node : buffer.pushed_nodes) { | 686 if (Node* node = buffer.pushed_nodes[n]) { |
| 687 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(node), | 687 int const slot = static_cast<int>(n); |
| 688 g.TempImmediate(slot << kPointerSizeLog2)); | 688 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(node), |
| 689 ++slot; | 689 g.TempImmediate(slot << kPointerSizeLog2)); |
| 690 } |
| 690 } | 691 } |
| 691 } else { | 692 } else { |
| 692 const int32_t push_count = static_cast<int32_t>(buffer.pushed_nodes.size()); | 693 const int32_t push_count = static_cast<int32_t>(buffer.pushed_nodes.size()); |
| 693 if (push_count > 0) { | 694 if (push_count > 0) { |
| 694 Emit(kMips64StackClaim, g.NoOutput(), | 695 Emit(kMips64StackClaim, g.NoOutput(), |
| 695 g.TempImmediate(push_count << kPointerSizeLog2)); | 696 g.TempImmediate(push_count << kPointerSizeLog2)); |
| 696 } | 697 } |
| 697 int32_t slot = push_count - 1; | 698 int32_t slot = push_count - 1; |
| 698 for (Node* node : base::Reversed(buffer.pushed_nodes)) { | 699 for (Node* node : base::Reversed(buffer.pushed_nodes)) { |
| 699 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(node), | 700 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(node), |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 MachineOperatorBuilder::kFloat32Min | | 1316 MachineOperatorBuilder::kFloat32Min | |
| 1316 MachineOperatorBuilder::kFloat64Max | | 1317 MachineOperatorBuilder::kFloat64Max | |
| 1317 MachineOperatorBuilder::kFloat64Min; | 1318 MachineOperatorBuilder::kFloat64Min; |
| 1318 } | 1319 } |
| 1319 return flags; | 1320 return flags; |
| 1320 } | 1321 } |
| 1321 | 1322 |
| 1322 } // namespace compiler | 1323 } // namespace compiler |
| 1323 } // namespace internal | 1324 } // namespace internal |
| 1324 } // namespace v8 | 1325 } // namespace v8 |
| OLD | NEW |