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

Side by Side Diff: src/x87/lithium-x87.cc

Issue 1216543004: X87: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/x87/lithium-x87.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_X87 9 #if V8_TARGET_ARCH_X87
10 10
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 1144
1145 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1145 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1146 } 1146 }
1147 1147
1148 1148
1149 LInstruction* LChunkBuilder::DoCallWithDescriptor( 1149 LInstruction* LChunkBuilder::DoCallWithDescriptor(
1150 HCallWithDescriptor* instr) { 1150 HCallWithDescriptor* instr) {
1151 CallInterfaceDescriptor descriptor = instr->descriptor(); 1151 CallInterfaceDescriptor descriptor = instr->descriptor();
1152 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); 1152 LOperand* target = UseRegisterOrConstantAtStart(instr->target());
1153 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); 1153 ZoneList<LOperand*> ops(instr->OperandCount(), zone());
1154 // Target
1154 ops.Add(target, zone()); 1155 ops.Add(target, zone());
1155 for (int i = 1; i < instr->OperandCount(); i++) { 1156 // Context
1156 LOperand* op = 1157 LOperand* op = UseFixed(instr->OperandAt(1), esi);
1157 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); 1158 ops.Add(op, zone());
1159 // Other register parameters
1160 for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount;
1161 i < instr->OperandCount(); i++) {
1162 op =
1163 UseFixed(instr->OperandAt(i),
1164 descriptor.GetRegisterParameter(
1165 i - LCallWithDescriptor::kImplicitRegisterParameterCount));
1158 ops.Add(op, zone()); 1166 ops.Add(op, zone());
1159 } 1167 }
1160 1168
1161 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( 1169 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
1162 descriptor, ops, zone()); 1170 descriptor, ops, zone());
1163 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1171 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1164 } 1172 }
1165 1173
1166 1174
1167 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { 1175 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2544 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { 2552 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
2545 LParameter* result = new(zone()) LParameter; 2553 LParameter* result = new(zone()) LParameter;
2546 if (instr->kind() == HParameter::STACK_PARAMETER) { 2554 if (instr->kind() == HParameter::STACK_PARAMETER) {
2547 int spill_index = chunk()->GetParameterStackSlot(instr->index()); 2555 int spill_index = chunk()->GetParameterStackSlot(instr->index());
2548 return DefineAsSpilled(result, spill_index); 2556 return DefineAsSpilled(result, spill_index);
2549 } else { 2557 } else {
2550 DCHECK(info()->IsStub()); 2558 DCHECK(info()->IsStub());
2551 CallInterfaceDescriptor descriptor = 2559 CallInterfaceDescriptor descriptor =
2552 info()->code_stub()->GetCallInterfaceDescriptor(); 2560 info()->code_stub()->GetCallInterfaceDescriptor();
2553 int index = static_cast<int>(instr->index()); 2561 int index = static_cast<int>(instr->index());
2554 Register reg = descriptor.GetEnvironmentParameterRegister(index); 2562 Register reg = descriptor.GetRegisterParameter(index);
2555 return DefineFixed(result, reg); 2563 return DefineFixed(result, reg);
2556 } 2564 }
2557 } 2565 }
2558 2566
2559 2567
2560 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2568 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2561 // Use an index that corresponds to the location in the unoptimized frame, 2569 // Use an index that corresponds to the location in the unoptimized frame,
2562 // which the optimized frame will subsume. 2570 // which the optimized frame will subsume.
2563 int env_index = instr->index(); 2571 int env_index = instr->index();
2564 int spill_index = 0; 2572 int spill_index = 0;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 LAllocateBlockContext* result = 2757 LAllocateBlockContext* result =
2750 new(zone()) LAllocateBlockContext(context, function); 2758 new(zone()) LAllocateBlockContext(context, function);
2751 return MarkAsCall(DefineFixed(result, esi), instr); 2759 return MarkAsCall(DefineFixed(result, esi), instr);
2752 } 2760 }
2753 2761
2754 2762
2755 } // namespace internal 2763 } // namespace internal
2756 } // namespace v8 2764 } // namespace v8
2757 2765
2758 #endif // V8_TARGET_ARCH_X87 2766 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/lithium-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698