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

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

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "src/v8.h"
6
7 #include "src/assembler.h"
8 #include "src/code-stubs.h"
9 #include "src/compiler/linkage.h"
10 #include "src/compiler/linkage-impl.h"
11 #include "src/zone.h"
12
13 namespace v8 {
14 namespace internal {
15 namespace compiler {
16
17 struct LinkageHelperTraits {
18 static Register ReturnValueReg() { return eax; }
19 static Register ReturnValue2Reg() { return edx; }
20 static Register JSCallFunctionReg() { return edi; }
21 static Register ContextReg() { return esi; }
22 static Register RuntimeCallFunctionReg() { return ebx; }
23 static Register RuntimeCallArgCountReg() { return eax; }
24 static RegList CCalleeSaveRegisters() {
25 return esi.bit() | edi.bit() | ebx.bit();
26 }
27 static Register CRegisterParameter(int i) { return no_reg; }
28 static int CRegisterParametersLength() { return 0; }
29 };
30
31
32 CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count, Zone* zone) {
33 return LinkageHelper::GetJSCallDescriptor<LinkageHelperTraits>(
34 zone, parameter_count);
35 }
36
37
38 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
39 Runtime::FunctionId function, int parameter_count,
40 Operator::Property properties,
41 CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
42 return LinkageHelper::GetRuntimeCallDescriptor<LinkageHelperTraits>(
43 zone, function, parameter_count, properties, can_deoptimize);
44 }
45
46
47 CallDescriptor* Linkage::GetStubCallDescriptor(
48 CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count) {
49 return LinkageHelper::GetStubCallDescriptor<LinkageHelperTraits>(
50 this->info_->zone(), descriptor, stack_parameter_count);
51 }
52
53
54 CallDescriptor* Linkage::GetSimplifiedCDescriptor(
55 Zone* zone, int num_params, MachineRepresentation return_type,
56 const MachineRepresentation* param_types) {
57 return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>(
58 zone, num_params, return_type, param_types);
59 }
60 }
61 }
62 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698