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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 frame_state_descriptor = | 591 frame_state_descriptor = |
592 GetFrameStateDescriptor(call->InputAt(descriptor->InputCount())); | 592 GetFrameStateDescriptor(call->InputAt(descriptor->InputCount())); |
593 } | 593 } |
594 | 594 |
595 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); | 595 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
596 | 596 |
597 // Compute InstructionOperands for inputs and outputs. | 597 // Compute InstructionOperands for inputs and outputs. |
598 // TODO(turbofan): on ARM64 it's probably better to use the code object in a | 598 // TODO(turbofan): on ARM64 it's probably better to use the code object in a |
599 // register if there are multiple uses of it. Improve constant pool and the | 599 // register if there are multiple uses of it. Improve constant pool and the |
600 // heuristics in the register allocator for where to emit constants. | 600 // heuristics in the register allocator for where to emit constants. |
601 InitializeCallBuffer(call, &buffer, true, false, continuation, | 601 InitializeCallBuffer(call, &buffer, true, false); |
602 deoptimization); | |
603 | 602 |
604 // Push the arguments to the stack. | 603 // Push the arguments to the stack. |
605 bool is_c_frame = descriptor->kind() == CallDescriptor::kCallAddress; | 604 bool is_c_frame = descriptor->kind() == CallDescriptor::kCallAddress; |
606 bool pushed_count_uneven = buffer.pushed_nodes.size() & 1; | 605 bool pushed_count_uneven = buffer.pushed_nodes.size() & 1; |
607 int aligned_push_count = buffer.pushed_nodes.size(); | 606 int aligned_push_count = buffer.pushed_nodes.size(); |
608 if (is_c_frame && pushed_count_uneven) { | 607 if (is_c_frame && pushed_count_uneven) { |
609 aligned_push_count++; | 608 aligned_push_count++; |
610 } | 609 } |
611 // TODO(dcarney): claim and poke probably take small immediates, | 610 // TODO(dcarney): claim and poke probably take small immediates, |
612 // loop here or whatever. | 611 // loop here or whatever. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 // Caller clean up of stack for C-style calls. | 666 // Caller clean up of stack for C-style calls. |
668 if (is_c_frame && aligned_push_count > 0) { | 667 if (is_c_frame && aligned_push_count > 0) { |
669 DCHECK(deoptimization == NULL && continuation == NULL); | 668 DCHECK(deoptimization == NULL && continuation == NULL); |
670 Emit(kArchDrop | MiscField::encode(aligned_push_count), NULL); | 669 Emit(kArchDrop | MiscField::encode(aligned_push_count), NULL); |
671 } | 670 } |
672 } | 671 } |
673 | 672 |
674 } // namespace compiler | 673 } // namespace compiler |
675 } // namespace internal | 674 } // namespace internal |
676 } // namespace v8 | 675 } // namespace v8 |
OLD | NEW |