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

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

Issue 1426943010: [turbofan] Spill rsi and rdi in their existing locations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
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.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 void InstructionSelector::VisitGuard(Node* node) { 1075 void InstructionSelector::VisitGuard(Node* node) {
1076 OperandGenerator g(this); 1076 OperandGenerator g(this);
1077 Node* value = node->InputAt(0); 1077 Node* value = node->InputAt(0);
1078 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); 1078 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1079 } 1079 }
1080 1080
1081 1081
1082 void InstructionSelector::VisitParameter(Node* node) { 1082 void InstructionSelector::VisitParameter(Node* node) {
1083 OperandGenerator g(this); 1083 OperandGenerator g(this);
1084 int index = ParameterIndexOf(node->op()); 1084 int index = ParameterIndexOf(node->op());
1085 Emit(kArchNop, 1085 InstructionOperand op =
1086 g.DefineAsLocation(node, linkage()->GetParameterLocation(index), 1086 g.DefineAsLocation(node, linkage()->GetParameterLocation(index),
1087 linkage()->GetParameterType(index))); 1087 linkage()->GetParameterType(index));
1088
1089 if (linkage()->ParameterHasSecondaryLocation(index)) {
1090 InstructionOperand prespilled = g.DefineAsLocation(
Jarin 2015/11/12 12:08:33 I am mildly surprised that it is possible to defin
Mircea Trofin 2015/11/12 18:01:35 Will do - if we keep this design.
1091 node, linkage()->GetParameterSecondaryLocation(index),
1092 linkage()->GetParameterType(index));
1093 InstructionOperand outputs[2] = {op, prespilled};
1094 Emit(kArchNop, 2, outputs, 0, nullptr);
1095 } else {
1096 Emit(kArchNop, op);
1097 }
1088 } 1098 }
1089 1099
1090 1100
1091 void InstructionSelector::VisitIfException(Node* node) { 1101 void InstructionSelector::VisitIfException(Node* node) {
1092 OperandGenerator g(this); 1102 OperandGenerator g(this);
1093 Node* call = node->InputAt(1); 1103 Node* call = node->InputAt(1);
1094 DCHECK_EQ(IrOpcode::kCall, call->opcode()); 1104 DCHECK_EQ(IrOpcode::kCall, call->opcode());
1095 const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(call); 1105 const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(call);
1096 Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0), 1106 Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0),
1097 descriptor->GetReturnType(0))); 1107 descriptor->GetReturnType(0)));
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 return new (instruction_zone()) FrameStateDescriptor( 1370 return new (instruction_zone()) FrameStateDescriptor(
1361 instruction_zone(), state_info.type(), state_info.bailout_id(), 1371 instruction_zone(), state_info.type(), state_info.bailout_id(),
1362 state_info.state_combine(), parameters, locals, stack, 1372 state_info.state_combine(), parameters, locals, stack,
1363 state_info.shared_info(), outer_state); 1373 state_info.shared_info(), outer_state);
1364 } 1374 }
1365 1375
1366 1376
1367 } // namespace compiler 1377 } // namespace compiler
1368 } // namespace internal 1378 } // namespace internal
1369 } // namespace v8 1379 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/frame.h ('k') | src/compiler/linkage.h » ('j') | src/compiler/linkage.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698