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.h" | 7 #include "src/compiler/node-properties.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 | 935 |
936 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); | 936 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
937 | 937 |
938 // Compute InstructionOperands for inputs and outputs. | 938 // Compute InstructionOperands for inputs and outputs. |
939 InitializeCallBuffer(node, &buffer, true, true); | 939 InitializeCallBuffer(node, &buffer, true, true); |
940 | 940 |
941 // Push any stack arguments. | 941 // Push any stack arguments. |
942 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); | 942 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); |
943 ++i) { | 943 ++i) { |
944 // TODO(titzer): handle pushing double parameters. | 944 // TODO(titzer): handle pushing double parameters. |
945 Emit(kX64Push, nullptr, | 945 InstructionOperand* value = |
946 g.CanBeImmediate(*i) ? g.UseImmediate(*i) : g.Use(*i)); | 946 g.CanBeImmediate(*i) ? g.UseImmediate(*i) : IsSupported(ATOM) |
| 947 ? g.UseRegister(*i) |
| 948 : g.Use(*i); |
| 949 Emit(kX64Push, nullptr, value); |
947 } | 950 } |
948 | 951 |
949 // Select the appropriate opcode based on the call type. | 952 // Select the appropriate opcode based on the call type. |
950 InstructionCode opcode; | 953 InstructionCode opcode; |
951 switch (descriptor->kind()) { | 954 switch (descriptor->kind()) { |
952 case CallDescriptor::kCallCodeObject: { | 955 case CallDescriptor::kCallCodeObject: { |
953 opcode = kArchCallCodeObject; | 956 opcode = kArchCallCodeObject; |
954 break; | 957 break; |
955 } | 958 } |
956 case CallDescriptor::kCallJSFunction: | 959 case CallDescriptor::kCallJSFunction: |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 MachineOperatorBuilder::kFloat64Ceil | | 1315 MachineOperatorBuilder::kFloat64Ceil | |
1313 MachineOperatorBuilder::kFloat64RoundTruncate | | 1316 MachineOperatorBuilder::kFloat64RoundTruncate | |
1314 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1317 MachineOperatorBuilder::kWord32ShiftIsSafe; |
1315 } | 1318 } |
1316 return MachineOperatorBuilder::kNoFlags; | 1319 return MachineOperatorBuilder::kNoFlags; |
1317 } | 1320 } |
1318 | 1321 |
1319 } // namespace compiler | 1322 } // namespace compiler |
1320 } // namespace internal | 1323 } // namespace internal |
1321 } // namespace v8 | 1324 } // namespace v8 |
OLD | NEW |