| 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 #include "src/compiler/node-properties-inl.h" | 7 #include "src/compiler/node-properties-inl.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 730 |
| 731 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); | 731 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
| 732 | 732 |
| 733 // Compute InstructionOperands for inputs and outputs. | 733 // Compute InstructionOperands for inputs and outputs. |
| 734 InitializeCallBuffer(node, &buffer, true, true); | 734 InitializeCallBuffer(node, &buffer, true, true); |
| 735 | 735 |
| 736 // Push any stack arguments. | 736 // Push any stack arguments. |
| 737 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); | 737 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); |
| 738 ++i) { | 738 ++i) { |
| 739 // TODO(titzer): handle pushing double parameters. | 739 // TODO(titzer): handle pushing double parameters. |
| 740 Emit(kIA32Push, nullptr, | 740 InstructionOperand* value = |
| 741 g.CanBeImmediate(*i) ? g.UseImmediate(*i) : g.Use(*i)); | 741 g.CanBeImmediate(*i) ? g.UseImmediate(*i) : IsSupported(ATOM) |
| 742 ? g.UseRegister(*i) |
| 743 : g.Use(*i); |
| 744 Emit(kIA32Push, nullptr, value); |
| 742 } | 745 } |
| 743 | 746 |
| 744 // Select the appropriate opcode based on the call type. | 747 // Select the appropriate opcode based on the call type. |
| 745 InstructionCode opcode; | 748 InstructionCode opcode; |
| 746 switch (descriptor->kind()) { | 749 switch (descriptor->kind()) { |
| 747 case CallDescriptor::kCallCodeObject: { | 750 case CallDescriptor::kCallCodeObject: { |
| 748 opcode = kArchCallCodeObject; | 751 opcode = kArchCallCodeObject; |
| 749 break; | 752 break; |
| 750 } | 753 } |
| 751 case CallDescriptor::kCallJSFunction: | 754 case CallDescriptor::kCallJSFunction: |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 MachineOperatorBuilder::kFloat64Ceil | | 1007 MachineOperatorBuilder::kFloat64Ceil | |
| 1005 MachineOperatorBuilder::kFloat64RoundTruncate | | 1008 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1006 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1009 MachineOperatorBuilder::kWord32ShiftIsSafe; |
| 1007 } | 1010 } |
| 1008 return MachineOperatorBuilder::Flag::kNoFlags; | 1011 return MachineOperatorBuilder::Flag::kNoFlags; |
| 1009 } | 1012 } |
| 1010 | 1013 |
| 1011 } // namespace compiler | 1014 } // namespace compiler |
| 1012 } // namespace internal | 1015 } // namespace internal |
| 1013 } // namespace v8 | 1016 } // namespace v8 |
| OLD | NEW |