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

Side by Side Diff: src/crankshaft/s390/lithium-s390.cc

Issue 2353303002: [crankshaft] HCallWithDescriptor is now able to pass arguments on the stack. (Closed)
Patch Set: arm64 fix Created 4 years, 3 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/crankshaft/ppc/lithium-ppc.cc ('k') | src/crankshaft/x64/lithium-x64.cc » ('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/crankshaft/s390/lithium-s390.h" 5 #include "src/crankshaft/s390/lithium-s390.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/lithium-inl.h" 10 #include "src/crankshaft/lithium-inl.h"
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 return DefineAsRegister(new (zone()) LContext); 914 return DefineAsRegister(new (zone()) LContext);
915 } 915 }
916 916
917 LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) { 917 LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
918 LOperand* context = UseFixed(instr->context(), cp); 918 LOperand* context = UseFixed(instr->context(), cp);
919 return MarkAsCall(new (zone()) LDeclareGlobals(context), instr); 919 return MarkAsCall(new (zone()) LDeclareGlobals(context), instr);
920 } 920 }
921 921
922 LInstruction* LChunkBuilder::DoCallWithDescriptor(HCallWithDescriptor* instr) { 922 LInstruction* LChunkBuilder::DoCallWithDescriptor(HCallWithDescriptor* instr) {
923 CallInterfaceDescriptor descriptor = instr->descriptor(); 923 CallInterfaceDescriptor descriptor = instr->descriptor();
924 DCHECK_EQ(descriptor.GetParameterCount() +
925 LCallWithDescriptor::kImplicitRegisterParameterCount,
926 instr->OperandCount());
924 927
925 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); 928 LOperand* target = UseRegisterOrConstantAtStart(instr->target());
926 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); 929 ZoneList<LOperand*> ops(instr->OperandCount(), zone());
927 // Target 930 // Target
928 ops.Add(target, zone()); 931 ops.Add(target, zone());
929 // Context 932 // Context
930 LOperand* op = UseFixed(instr->OperandAt(1), cp); 933 LOperand* op = UseFixed(instr->OperandAt(1), cp);
931 ops.Add(op, zone()); 934 ops.Add(op, zone());
932 // Other register parameters 935 // Load register parameters.
933 for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount; 936 int i = 0;
934 i < instr->OperandCount(); i++) { 937 for (; i < descriptor.GetRegisterParameterCount(); i++) {
935 op = 938 op = UseFixed(instr->OperandAt(
936 UseFixed(instr->OperandAt(i), 939 i + LCallWithDescriptor::kImplicitRegisterParameterCount),
937 descriptor.GetRegisterParameter( 940 descriptor.GetRegisterParameter(i));
938 i - LCallWithDescriptor::kImplicitRegisterParameterCount));
939 ops.Add(op, zone()); 941 ops.Add(op, zone());
940 } 942 }
943 // Push stack parameters.
944 for (; i < descriptor.GetParameterCount(); i++) {
945 op = UseAny(instr->OperandAt(
946 i + LCallWithDescriptor::kImplicitRegisterParameterCount));
947 AddInstruction(new (zone()) LPushArgument(op), instr);
948 }
941 949
942 LCallWithDescriptor* result = 950 LCallWithDescriptor* result =
943 new (zone()) LCallWithDescriptor(descriptor, ops, zone()); 951 new (zone()) LCallWithDescriptor(descriptor, ops, zone());
944 if (instr->syntactic_tail_call_mode() == TailCallMode::kAllow) { 952 if (instr->syntactic_tail_call_mode() == TailCallMode::kAllow) {
945 result->MarkAsSyntacticTailCall(); 953 result->MarkAsSyntacticTailCall();
946 } 954 }
947 return MarkAsCall(DefineFixed(result, r2), instr); 955 return MarkAsCall(DefineFixed(result, r2), instr);
948 } 956 }
949 957
950 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { 958 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2219 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2212 LOperand* object = UseRegister(instr->object()); 2220 LOperand* object = UseRegister(instr->object());
2213 LOperand* index = UseTempRegister(instr->index()); 2221 LOperand* index = UseTempRegister(instr->index());
2214 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); 2222 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index);
2215 LInstruction* result = DefineSameAsFirst(load); 2223 LInstruction* result = DefineSameAsFirst(load);
2216 return AssignPointerMap(result); 2224 return AssignPointerMap(result);
2217 } 2225 }
2218 2226
2219 } // namespace internal 2227 } // namespace internal
2220 } // namespace v8 2228 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-ppc.cc ('k') | src/crankshaft/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698