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

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

Issue 714093002: PowerPC specific sub-directories. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/ppc/full-codegen-ppc.cc ('k') | src/ppc/lithium-codegen-ppc.h » ('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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/interface-descriptors.h" 9 #include "src/interface-descriptors.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 const Register CallInterfaceDescriptor::ContextRegister() { return cp; } 14 const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
15 15
16 16
17 const Register LoadDescriptor::ReceiverRegister() { return a1; } 17 const Register LoadDescriptor::ReceiverRegister() { return r4; }
18 const Register LoadDescriptor::NameRegister() { return a2; } 18 const Register LoadDescriptor::NameRegister() { return r5; }
19 19
20 20
21 const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return a0; } 21 const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return r3; }
22 22
23 23
24 const Register VectorLoadICDescriptor::VectorRegister() { return a3; } 24 const Register VectorLoadICDescriptor::VectorRegister() { return r6; }
25 25
26 26
27 const Register StoreDescriptor::ReceiverRegister() { return a1; } 27 const Register StoreDescriptor::ReceiverRegister() { return r4; }
28 const Register StoreDescriptor::NameRegister() { return a2; } 28 const Register StoreDescriptor::NameRegister() { return r5; }
29 const Register StoreDescriptor::ValueRegister() { return a0; } 29 const Register StoreDescriptor::ValueRegister() { return r3; }
30 30
31 31
32 const Register StoreTransitionDescriptor::MapRegister() { return a3; } 32 const Register StoreTransitionDescriptor::MapRegister() { return r6; }
33 33
34 34
35 const Register ElementTransitionAndStoreDescriptor::MapRegister() { return a3; } 35 const Register ElementTransitionAndStoreDescriptor::MapRegister() { return r6; }
36 36
37 37
38 const Register InstanceofDescriptor::left() { return a0; } 38 const Register InstanceofDescriptor::left() { return r3; }
39 const Register InstanceofDescriptor::right() { return a1; } 39 const Register InstanceofDescriptor::right() { return r4; }
40 40
41 41
42 const Register ArgumentsAccessReadDescriptor::index() { return a1; } 42 const Register ArgumentsAccessReadDescriptor::index() { return r4; }
43 const Register ArgumentsAccessReadDescriptor::parameter_count() { return a0; } 43 const Register ArgumentsAccessReadDescriptor::parameter_count() { return r3; }
44 44
45 45
46 const Register ApiGetterDescriptor::function_address() { return a2; } 46 const Register ApiGetterDescriptor::function_address() { return r5; }
47 47
48 48
49 const Register MathPowTaggedDescriptor::exponent() { return a2; } 49 const Register MathPowTaggedDescriptor::exponent() { return r5; }
50 50
51 51
52 const Register MathPowIntegerDescriptor::exponent() { 52 const Register MathPowIntegerDescriptor::exponent() {
53 return MathPowTaggedDescriptor::exponent(); 53 return MathPowTaggedDescriptor::exponent();
54 } 54 }
55 55
56 56
57 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { 57 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
58 Register registers[] = {cp, a2}; 58 Register registers[] = {cp, r5};
59 data->Initialize(arraysize(registers), registers, NULL); 59 data->Initialize(arraysize(registers), registers, NULL);
60 } 60 }
61 61
62 62
63 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { 63 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
64 Register registers[] = {cp, a1}; 64 Register registers[] = {cp, r4};
65 data->Initialize(arraysize(registers), registers, NULL); 65 data->Initialize(arraysize(registers), registers, NULL);
66 } 66 }
67 67
68 68
69 void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) { 69 void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
70 Register registers[] = {cp, a0}; 70 Register registers[] = {cp, r3};
71 data->Initialize(arraysize(registers), registers, NULL); 71 data->Initialize(arraysize(registers), registers, NULL);
72 } 72 }
73 73
74 74
75 void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) { 75 void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
76 Register registers[] = {cp, a0}; 76 Register registers[] = {cp, r3};
77 data->Initialize(arraysize(registers), registers, NULL); 77 data->Initialize(arraysize(registers), registers, NULL);
78 } 78 }
79 79
80 80
81 void FastCloneShallowArrayDescriptor::Initialize( 81 void FastCloneShallowArrayDescriptor::Initialize(
82 CallInterfaceDescriptorData* data) { 82 CallInterfaceDescriptorData* data) {
83 Register registers[] = {cp, a3, a2, a1}; 83 Register registers[] = {cp, r6, r5, r4};
84 Representation representations[] = { 84 Representation representations[] = {
85 Representation::Tagged(), Representation::Tagged(), Representation::Smi(), 85 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
86 Representation::Tagged()}; 86 Representation::Tagged()};
87 data->Initialize(arraysize(registers), registers, representations); 87 data->Initialize(arraysize(registers), registers, representations);
88 } 88 }
89 89
90 90
91 void FastCloneShallowObjectDescriptor::Initialize( 91 void FastCloneShallowObjectDescriptor::Initialize(
92 CallInterfaceDescriptorData* data) { 92 CallInterfaceDescriptorData* data) {
93 Register registers[] = {cp, a3, a2, a1, a0}; 93 Register registers[] = {cp, r6, r5, r4, r3};
94 data->Initialize(arraysize(registers), registers, NULL); 94 data->Initialize(arraysize(registers), registers, NULL);
95 } 95 }
96 96
97 97
98 void CreateAllocationSiteDescriptor::Initialize( 98 void CreateAllocationSiteDescriptor::Initialize(
99 CallInterfaceDescriptorData* data) { 99 CallInterfaceDescriptorData* data) {
100 Register registers[] = {cp, a2, a3}; 100 Register registers[] = {cp, r5, r6};
101 data->Initialize(arraysize(registers), registers, NULL); 101 data->Initialize(arraysize(registers), registers, NULL);
102 } 102 }
103 103
104 104
105 void StoreArrayLiteralElementDescriptor::Initialize( 105 void StoreArrayLiteralElementDescriptor::Initialize(
106 CallInterfaceDescriptorData* data) { 106 CallInterfaceDescriptorData* data) {
107 Register registers[] = {cp, a3, a0}; 107 Register registers[] = {cp, r6, r3};
108 data->Initialize(arraysize(registers), registers, NULL); 108 data->Initialize(arraysize(registers), registers, NULL);
109 } 109 }
110 110
111 111
112 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { 112 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
113 Register registers[] = {cp, a1}; 113 Register registers[] = {cp, r4};
114 data->Initialize(arraysize(registers), registers, NULL); 114 data->Initialize(arraysize(registers), registers, NULL);
115 } 115 }
116 116
117 117
118 void CallFunctionWithFeedbackDescriptor::Initialize( 118 void CallFunctionWithFeedbackDescriptor::Initialize(
119 CallInterfaceDescriptorData* data) { 119 CallInterfaceDescriptorData* data) {
120 Register registers[] = {cp, a1, a3}; 120 Register registers[] = {cp, r4, r6};
121 Representation representations[] = {Representation::Tagged(), 121 Representation representations[] = {Representation::Tagged(),
122 Representation::Tagged(), 122 Representation::Tagged(),
123 Representation::Smi()}; 123 Representation::Smi()};
124 data->Initialize(arraysize(registers), registers, representations); 124 data->Initialize(arraysize(registers), registers, representations);
125 } 125 }
126 126
127 127
128 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { 128 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) {
129 // a0 : number of arguments 129 // r3 : number of arguments
130 // a1 : the function to call 130 // r4 : the function to call
131 // a2 : feedback vector 131 // r5 : feedback vector
132 // a3 : (only if a2 is not the megamorphic symbol) slot in feedback 132 // r6 : (only if r5 is not the megamorphic symbol) slot in feedback
133 // vector (Smi) 133 // vector (Smi)
134 // TODO(turbofan): So far we don't gather type feedback and hence skip the 134 // TODO(turbofan): So far we don't gather type feedback and hence skip the
135 // slot parameter, but ArrayConstructStub needs the vector to be undefined. 135 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
136 Register registers[] = {cp, a0, a1, a2}; 136 Register registers[] = {cp, r3, r4, r5};
137 data->Initialize(arraysize(registers), registers, NULL); 137 data->Initialize(arraysize(registers), registers, NULL);
138 } 138 }
139 139
140 140
141 void RegExpConstructResultDescriptor::Initialize( 141 void RegExpConstructResultDescriptor::Initialize(
142 CallInterfaceDescriptorData* data) { 142 CallInterfaceDescriptorData* data) {
143 Register registers[] = {cp, a2, a1, a0}; 143 Register registers[] = {cp, r5, r4, r3};
144 data->Initialize(arraysize(registers), registers, NULL); 144 data->Initialize(arraysize(registers), registers, NULL);
145 } 145 }
146 146
147 147
148 void TransitionElementsKindDescriptor::Initialize( 148 void TransitionElementsKindDescriptor::Initialize(
149 CallInterfaceDescriptorData* data) { 149 CallInterfaceDescriptorData* data) {
150 Register registers[] = {cp, a0, a1}; 150 Register registers[] = {cp, r3, r4};
151 data->Initialize(arraysize(registers), registers, NULL); 151 data->Initialize(arraysize(registers), registers, NULL);
152 } 152 }
153 153
154 154
155 void AllocateHeapNumberDescriptor::Initialize(
156 CallInterfaceDescriptorData* data) {
157 // register state
158 // cp -- context
159 Register registers[] = {cp};
160 data->Initialize(arraysize(registers), registers, nullptr);
161 }
162
163
164 void ArrayConstructorConstantArgCountDescriptor::Initialize( 155 void ArrayConstructorConstantArgCountDescriptor::Initialize(
165 CallInterfaceDescriptorData* data) { 156 CallInterfaceDescriptorData* data) {
166 // register state 157 // register state
167 // cp -- context 158 // cp -- context
168 // a0 -- number of arguments 159 // r3 -- number of arguments
169 // a1 -- function 160 // r4 -- function
170 // a2 -- allocation site with elements kind 161 // r5 -- allocation site with elements kind
171 Register registers[] = {cp, a1, a2}; 162 Register registers[] = {cp, r4, r5};
172 data->Initialize(arraysize(registers), registers, NULL); 163 data->Initialize(arraysize(registers), registers, NULL);
173 } 164 }
174 165
175 166
176 void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 167 void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
177 // stack param count needs (constructor pointer, and single argument) 168 // stack param count needs (constructor pointer, and single argument)
178 Register registers[] = {cp, a1, a2, a0}; 169 Register registers[] = {cp, r4, r5, r3};
179 Representation representations[] = { 170 Representation representations[] = {
180 Representation::Tagged(), Representation::Tagged(), 171 Representation::Tagged(), Representation::Tagged(),
181 Representation::Tagged(), Representation::Integer32()}; 172 Representation::Tagged(), Representation::Integer32()};
182 data->Initialize(arraysize(registers), registers, representations); 173 data->Initialize(arraysize(registers), registers, representations);
183 } 174 }
184 175
185 176
186 void InternalArrayConstructorConstantArgCountDescriptor::Initialize( 177 void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
187 CallInterfaceDescriptorData* data) { 178 CallInterfaceDescriptorData* data) {
188 // register state 179 // register state
189 // cp -- context 180 // cp -- context
190 // a0 -- number of arguments 181 // r3 -- number of arguments
191 // a1 -- constructor function 182 // r4 -- constructor function
192 Register registers[] = {cp, a1}; 183 Register registers[] = {cp, r4};
193 data->Initialize(arraysize(registers), registers, NULL); 184 data->Initialize(arraysize(registers), registers, NULL);
194 } 185 }
195 186
196 187
197 void InternalArrayConstructorDescriptor::Initialize( 188 void InternalArrayConstructorDescriptor::Initialize(
198 CallInterfaceDescriptorData* data) { 189 CallInterfaceDescriptorData* data) {
199 // stack param count needs (constructor pointer, and single argument) 190 // stack param count needs (constructor pointer, and single argument)
200 Register registers[] = {cp, a1, a0}; 191 Register registers[] = {cp, r4, r3};
201 Representation representations[] = {Representation::Tagged(), 192 Representation representations[] = {Representation::Tagged(),
202 Representation::Tagged(), 193 Representation::Tagged(),
203 Representation::Integer32()}; 194 Representation::Integer32()};
204 data->Initialize(arraysize(registers), registers, representations); 195 data->Initialize(arraysize(registers), registers, representations);
205 } 196 }
206 197
207 198
208 void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) { 199 void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
209 Register registers[] = {cp, a0}; 200 Register registers[] = {cp, r3};
210 data->Initialize(arraysize(registers), registers, NULL); 201 data->Initialize(arraysize(registers), registers, NULL);
211 } 202 }
212 203
213 204
214 void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) { 205 void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
215 Register registers[] = {cp, a0}; 206 Register registers[] = {cp, r3};
216 data->Initialize(arraysize(registers), registers, NULL); 207 data->Initialize(arraysize(registers), registers, NULL);
217 } 208 }
218 209
219 210
220 void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) { 211 void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
221 Register registers[] = {cp, a1, a0}; 212 Register registers[] = {cp, r4, r3};
222 data->Initialize(arraysize(registers), registers, NULL); 213 data->Initialize(arraysize(registers), registers, NULL);
223 } 214 }
224 215
225 216
226 void BinaryOpWithAllocationSiteDescriptor::Initialize( 217 void BinaryOpWithAllocationSiteDescriptor::Initialize(
227 CallInterfaceDescriptorData* data) { 218 CallInterfaceDescriptorData* data) {
228 Register registers[] = {cp, a2, a1, a0}; 219 Register registers[] = {cp, r5, r4, r3};
229 data->Initialize(arraysize(registers), registers, NULL); 220 data->Initialize(arraysize(registers), registers, NULL);
230 } 221 }
231 222
232 223
233 void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) { 224 void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
234 Register registers[] = {cp, a1, a0}; 225 Register registers[] = {cp, r4, r3};
235 data->Initialize(arraysize(registers), registers, NULL); 226 data->Initialize(arraysize(registers), registers, NULL);
236 } 227 }
237 228
238 229
239 void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) { 230 void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
240 Register registers[] = { 231 Register registers[] = {
241 cp, // context 232 cp, // context
242 a2, // key 233 r5, // key
243 }; 234 };
244 Representation representations[] = { 235 Representation representations[] = {
245 Representation::Tagged(), // context 236 Representation::Tagged(), // context
246 Representation::Tagged(), // key 237 Representation::Tagged(), // key
247 }; 238 };
248 data->Initialize(arraysize(registers), registers, representations); 239 data->Initialize(arraysize(registers), registers, representations);
249 } 240 }
250 241
251 242
252 void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) { 243 void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
253 Register registers[] = { 244 Register registers[] = {
254 cp, // context 245 cp, // context
255 a2, // name 246 r5, // name
256 }; 247 };
257 Representation representations[] = { 248 Representation representations[] = {
258 Representation::Tagged(), // context 249 Representation::Tagged(), // context
259 Representation::Tagged(), // name 250 Representation::Tagged(), // name
260 }; 251 };
261 data->Initialize(arraysize(registers), registers, representations); 252 data->Initialize(arraysize(registers), registers, representations);
262 } 253 }
263 254
264 255
265 void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) { 256 void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
266 Register registers[] = { 257 Register registers[] = {
267 cp, // context 258 cp, // context
268 a0, // receiver 259 r3, // receiver
269 }; 260 };
270 Representation representations[] = { 261 Representation representations[] = {
271 Representation::Tagged(), // context 262 Representation::Tagged(), // context
272 Representation::Tagged(), // receiver 263 Representation::Tagged(), // receiver
273 }; 264 };
274 data->Initialize(arraysize(registers), registers, representations); 265 data->Initialize(arraysize(registers), registers, representations);
275 } 266 }
276 267
277 268
278 void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 269 void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
279 Register registers[] = { 270 Register registers[] = {
280 cp, // context 271 cp, // context
281 a1, // JSFunction 272 r4, // JSFunction
282 a0, // actual number of arguments 273 r3, // actual number of arguments
283 a2, // expected number of arguments 274 r5, // expected number of arguments
284 }; 275 };
285 Representation representations[] = { 276 Representation representations[] = {
286 Representation::Tagged(), // context 277 Representation::Tagged(), // context
287 Representation::Tagged(), // JSFunction 278 Representation::Tagged(), // JSFunction
288 Representation::Integer32(), // actual number of arguments 279 Representation::Integer32(), // actual number of arguments
289 Representation::Integer32(), // expected number of arguments 280 Representation::Integer32(), // expected number of arguments
290 }; 281 };
291 data->Initialize(arraysize(registers), registers, representations); 282 data->Initialize(arraysize(registers), registers, representations);
292 } 283 }
293 284
294 285
295 void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { 286 void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
296 Register registers[] = { 287 Register registers[] = {
297 cp, // context 288 cp, // context
298 a0, // callee 289 r3, // callee
299 t0, // call_data 290 r7, // call_data
300 a2, // holder 291 r5, // holder
301 a1, // api_function_address 292 r4, // api_function_address
302 }; 293 };
303 Representation representations[] = { 294 Representation representations[] = {
304 Representation::Tagged(), // context 295 Representation::Tagged(), // context
305 Representation::Tagged(), // callee 296 Representation::Tagged(), // callee
306 Representation::Tagged(), // call_data 297 Representation::Tagged(), // call_data
307 Representation::Tagged(), // holder 298 Representation::Tagged(), // holder
308 Representation::External(), // api_function_address 299 Representation::External(), // api_function_address
309 }; 300 };
310 data->Initialize(arraysize(registers), registers, representations); 301 data->Initialize(arraysize(registers), registers, representations);
311 } 302 }
312 } 303 }
313 } // namespace v8::internal 304 } // namespace v8::internal
314 305
315 #endif // V8_TARGET_ARCH_MIPS 306 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/ppc/lithium-codegen-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698