Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 853703002: [x86] Avoid memory form of PUSH/CALL for ATOM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698