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

Side by Side Diff: src/x64/interface-descriptors-x64.cc

Issue 2002143002: [stubs] An easier way of defining a stub call interface descriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/s390/interface-descriptors-s390.cc ('k') | src/x87/interface-descriptors-x87.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 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/interface-descriptors.h" 7 #include "src/interface-descriptors.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 11
12 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; } 12 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; }
13 13
14 void CallInterfaceDescriptor::DefaultInitializePlatformSpecific(
15 CallInterfaceDescriptorData* data, int register_parameter_count) {
16 const Register default_stub_registers[] = {rax, rbx, rcx, rdx, rdi};
17 CHECK_LE(static_cast<size_t>(register_parameter_count),
18 arraysize(default_stub_registers));
19 data->InitializePlatformSpecific(register_parameter_count,
20 default_stub_registers);
21 }
14 22
15 const Register LoadDescriptor::ReceiverRegister() { return rdx; } 23 const Register LoadDescriptor::ReceiverRegister() { return rdx; }
16 const Register LoadDescriptor::NameRegister() { return rcx; } 24 const Register LoadDescriptor::NameRegister() { return rcx; }
17 const Register LoadDescriptor::SlotRegister() { return rax; } 25 const Register LoadDescriptor::SlotRegister() { return rax; }
18 26
19 27
20 const Register LoadWithVectorDescriptor::VectorRegister() { return rbx; } 28 const Register LoadWithVectorDescriptor::VectorRegister() { return rbx; }
21 29
22 30
23 const Register StoreDescriptor::ReceiverRegister() { return rdx; } 31 const Register StoreDescriptor::ReceiverRegister() { return rdx; }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 64
57 65
58 const Register MathPowIntegerDescriptor::exponent() { 66 const Register MathPowIntegerDescriptor::exponent() {
59 return MathPowTaggedDescriptor::exponent(); 67 return MathPowTaggedDescriptor::exponent();
60 } 68 }
61 69
62 70
63 const Register GrowArrayElementsDescriptor::ObjectRegister() { return rax; } 71 const Register GrowArrayElementsDescriptor::ObjectRegister() { return rax; }
64 const Register GrowArrayElementsDescriptor::KeyRegister() { return rbx; } 72 const Register GrowArrayElementsDescriptor::KeyRegister() { return rbx; }
65 73
66 const Register HasPropertyDescriptor::ObjectRegister() { return rax; }
67 const Register HasPropertyDescriptor::KeyRegister() { return rbx; }
68 74
69 void FastNewClosureDescriptor::InitializePlatformSpecific( 75 void FastNewClosureDescriptor::InitializePlatformSpecific(
70 CallInterfaceDescriptorData* data) { 76 CallInterfaceDescriptorData* data) {
71 Register registers[] = {rbx}; 77 Register registers[] = {rbx};
72 data->InitializePlatformSpecific(arraysize(registers), registers); 78 data->InitializePlatformSpecific(arraysize(registers), registers);
73 } 79 }
74 80
75 81
76 void FastNewContextDescriptor::InitializePlatformSpecific( 82 void FastNewContextDescriptor::InitializePlatformSpecific(
77 CallInterfaceDescriptorData* data) { 83 CallInterfaceDescriptorData* data) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 rbx, // the JSGeneratorObject to resume 416 rbx, // the JSGeneratorObject to resume
411 rdx // the resume mode (tagged) 417 rdx // the resume mode (tagged)
412 }; 418 };
413 data->InitializePlatformSpecific(arraysize(registers), registers); 419 data->InitializePlatformSpecific(arraysize(registers), registers);
414 } 420 }
415 421
416 } // namespace internal 422 } // namespace internal
417 } // namespace v8 423 } // namespace v8
418 424
419 #endif // V8_TARGET_ARCH_X64 425 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/s390/interface-descriptors-s390.cc ('k') | src/x87/interface-descriptors-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698