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

Side by Side Diff: src/compiler/mips/linkage-mips.cc

Issue 1205023002: [turbofan] Add basic support for calling to (a subset of) C functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix argument slots. Created 5 years, 6 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
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/assembler.h" 5 #include "src/assembler.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/linkage-impl.h" 8 #include "src/compiler/linkage-impl.h"
9 #include "src/zone.h" 9 #include "src/zone.h"
10 10
(...skipping 10 matching lines...) Expand all
21 static Register RuntimeCallArgCountReg() { return a0; } 21 static Register RuntimeCallArgCountReg() { return a0; }
22 static RegList CCalleeSaveRegisters() { 22 static RegList CCalleeSaveRegisters() {
23 return s0.bit() | s1.bit() | s2.bit() | s3.bit() | s4.bit() | s5.bit() | 23 return s0.bit() | s1.bit() | s2.bit() | s3.bit() | s4.bit() | s5.bit() |
24 s6.bit() | s7.bit(); 24 s6.bit() | s7.bit();
25 } 25 }
26 static Register CRegisterParameter(int i) { 26 static Register CRegisterParameter(int i) {
27 static Register register_parameters[] = {a0, a1, a2, a3}; 27 static Register register_parameters[] = {a0, a1, a2, a3};
28 return register_parameters[i]; 28 return register_parameters[i];
29 } 29 }
30 static int CRegisterParametersLength() { return 4; } 30 static int CRegisterParametersLength() { return 4; }
31 static int CStackBackingStoreLength() { return 0; }
31 }; 32 };
32 33
33 34
34 typedef LinkageHelper<MipsLinkageHelperTraits> LH; 35 typedef LinkageHelper<MipsLinkageHelperTraits> LH;
35 36
36 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, 37 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
37 int parameter_count, 38 int parameter_count,
38 CallDescriptor::Flags flags) { 39 CallDescriptor::Flags flags) {
39 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags); 40 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags);
40 } 41 }
(...skipping 18 matching lines...) Expand all
59 60
60 61
61 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, 62 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
62 const MachineSignature* sig) { 63 const MachineSignature* sig) {
63 return LH::GetSimplifiedCDescriptor(zone, sig); 64 return LH::GetSimplifiedCDescriptor(zone, sig);
64 } 65 }
65 66
66 } // namespace compiler 67 } // namespace compiler
67 } // namespace internal 68 } // namespace internal
68 } // namespace v8 69 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698