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

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

Issue 1206893002: PPC: Use big-boy Types to annotate interface descriptor parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Clean up 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
« no previous file with comments | « no previous file | no next file » | 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/interface-descriptors.h" 9 #include "src/interface-descriptors.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 const Register MathPowIntegerDescriptor::exponent() { 56 const Register MathPowIntegerDescriptor::exponent() {
57 return MathPowTaggedDescriptor::exponent(); 57 return MathPowTaggedDescriptor::exponent();
58 } 58 }
59 59
60 60
61 const Register GrowArrayElementsDescriptor::ObjectRegister() { return r3; } 61 const Register GrowArrayElementsDescriptor::ObjectRegister() { return r3; }
62 const Register GrowArrayElementsDescriptor::KeyRegister() { return r6; } 62 const Register GrowArrayElementsDescriptor::KeyRegister() { return r6; }
63 63
64 64
65 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { 65 void FastNewClosureDescriptor::InitializePlatformSpecific(
66 CallInterfaceDescriptorData* data) {
66 Register registers[] = {cp, r5}; 67 Register registers[] = {cp, r5};
67 data->Initialize(arraysize(registers), registers, NULL); 68 data->InitializePlatformSpecific(arraysize(registers), registers);
68 } 69 }
69 70
70 71
71 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { 72 void FastNewContextDescriptor::InitializePlatformSpecific(
73 CallInterfaceDescriptorData* data) {
72 Register registers[] = {cp, r4}; 74 Register registers[] = {cp, r4};
73 data->Initialize(arraysize(registers), registers, NULL); 75 data->InitializePlatformSpecific(arraysize(registers), registers);
74 } 76 }
75 77
76 78
77 void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) { 79 void ToNumberDescriptor::InitializePlatformSpecific(
80 CallInterfaceDescriptorData* data) {
78 Register registers[] = {cp, r3}; 81 Register registers[] = {cp, r3};
79 data->Initialize(arraysize(registers), registers, NULL); 82 data->InitializePlatformSpecific(arraysize(registers), registers);
80 } 83 }
81 84
82 85
83 void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) { 86 void NumberToStringDescriptor::InitializePlatformSpecific(
87 CallInterfaceDescriptorData* data) {
84 Register registers[] = {cp, r3}; 88 Register registers[] = {cp, r3};
85 data->Initialize(arraysize(registers), registers, NULL); 89 data->InitializePlatformSpecific(arraysize(registers), registers);
86 } 90 }
87 91
88 92
89 void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) { 93 void TypeofDescriptor::InitializePlatformSpecific(
94 CallInterfaceDescriptorData* data) {
90 Register registers[] = {cp, r6}; 95 Register registers[] = {cp, r6};
91 data->Initialize(arraysize(registers), registers, NULL); 96 data->InitializePlatformSpecific(arraysize(registers), registers);
92 } 97 }
93 98
94 99
95 void FastCloneShallowArrayDescriptor::Initialize( 100 void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
96 CallInterfaceDescriptorData* data) { 101 CallInterfaceDescriptorData* data) {
97 Register registers[] = {cp, r6, r5, r4}; 102 Register registers[] = {cp, r6, r5, r4};
98 Representation representations[] = { 103 data->InitializePlatformSpecific(arraysize(registers), registers);
99 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
100 Representation::Tagged()};
101 data->Initialize(arraysize(registers), registers, representations);
102 } 104 }
103 105
104 106
105 void FastCloneShallowObjectDescriptor::Initialize( 107 void FastCloneShallowObjectDescriptor::InitializePlatformSpecific(
106 CallInterfaceDescriptorData* data) { 108 CallInterfaceDescriptorData* data) {
107 Register registers[] = {cp, r6, r5, r4, r3}; 109 Register registers[] = {cp, r6, r5, r4, r3};
108 data->Initialize(arraysize(registers), registers, NULL); 110 data->InitializePlatformSpecific(arraysize(registers), registers);
109 } 111 }
110 112
111 113
112 void CreateAllocationSiteDescriptor::Initialize( 114 void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
113 CallInterfaceDescriptorData* data) { 115 CallInterfaceDescriptorData* data) {
114 Register registers[] = {cp, r5, r6}; 116 Register registers[] = {cp, r5, r6};
115 Representation representations[] = {Representation::Tagged(), 117 data->InitializePlatformSpecific(arraysize(registers), registers);
116 Representation::Tagged(),
117 Representation::Smi()};
118 data->Initialize(arraysize(registers), registers, representations);
119 } 118 }
120 119
121 120
122 void CreateWeakCellDescriptor::Initialize(CallInterfaceDescriptorData* data) { 121 void CreateWeakCellDescriptor::InitializePlatformSpecific(
122 CallInterfaceDescriptorData* data) {
123 Register registers[] = {cp, r5, r6, r4}; 123 Register registers[] = {cp, r5, r6, r4};
124 Representation representations[] = { 124 data->InitializePlatformSpecific(arraysize(registers), registers);
125 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
126 Representation::Tagged()};
127 data->Initialize(arraysize(registers), registers, representations);
128 } 125 }
129 126
130 127
131 void StoreArrayLiteralElementDescriptor::Initialize( 128 void StoreArrayLiteralElementDescriptor::InitializePlatformSpecific(
132 CallInterfaceDescriptorData* data) { 129 CallInterfaceDescriptorData* data) {
133 Register registers[] = {cp, r6, r3}; 130 Register registers[] = {cp, r6, r3};
134 data->Initialize(arraysize(registers), registers, NULL); 131 data->InitializePlatformSpecific(arraysize(registers), registers);
135 } 132 }
136 133
137 134
138 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { 135 void CallFunctionDescriptor::InitializePlatformSpecific(
136 CallInterfaceDescriptorData* data) {
139 Register registers[] = {cp, r4}; 137 Register registers[] = {cp, r4};
140 data->Initialize(arraysize(registers), registers, NULL); 138 data->InitializePlatformSpecific(arraysize(registers), registers);
141 } 139 }
142 140
143 141
144 void CallFunctionWithFeedbackDescriptor::Initialize( 142 void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
145 CallInterfaceDescriptorData* data) { 143 CallInterfaceDescriptorData* data) {
146 Register registers[] = {cp, r4, r6}; 144 Register registers[] = {cp, r4, r6};
147 Representation representations[] = {Representation::Tagged(), 145 data->InitializePlatformSpecific(arraysize(registers), registers);
148 Representation::Tagged(),
149 Representation::Smi()};
150 data->Initialize(arraysize(registers), registers, representations);
151 } 146 }
152 147
153 148
154 void CallFunctionWithFeedbackAndVectorDescriptor::Initialize( 149 void CallFunctionWithFeedbackAndVectorDescriptor::InitializePlatformSpecific(
155 CallInterfaceDescriptorData* data) { 150 CallInterfaceDescriptorData* data) {
156 Register registers[] = {cp, r4, r6, r5}; 151 Register registers[] = {cp, r4, r6, r5};
157 Representation representations[] = { 152 data->InitializePlatformSpecific(arraysize(registers), registers);
158 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
159 Representation::Tagged()};
160 data->Initialize(arraysize(registers), registers, representations);
161 } 153 }
162 154
163 155
164 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { 156 void CallConstructDescriptor::InitializePlatformSpecific(
157 CallInterfaceDescriptorData* data) {
165 // r3 : number of arguments 158 // r3 : number of arguments
166 // r4 : the function to call 159 // r4 : the function to call
167 // r5 : feedback vector 160 // r5 : feedback vector
168 // r6 : (only if r5 is not the megamorphic symbol) slot in feedback 161 // r6 : (only if r5 is not the megamorphic symbol) slot in feedback
169 // vector (Smi) 162 // vector (Smi)
170 // TODO(turbofan): So far we don't gather type feedback and hence skip the 163 // TODO(turbofan): So far we don't gather type feedback and hence skip the
171 // slot parameter, but ArrayConstructStub needs the vector to be undefined. 164 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
172 Register registers[] = {cp, r3, r4, r5}; 165 Register registers[] = {cp, r3, r4, r5};
173 data->Initialize(arraysize(registers), registers, NULL); 166 data->InitializePlatformSpecific(arraysize(registers), registers);
174 } 167 }
175 168
176 169
177 void RegExpConstructResultDescriptor::Initialize( 170 void RegExpConstructResultDescriptor::InitializePlatformSpecific(
178 CallInterfaceDescriptorData* data) { 171 CallInterfaceDescriptorData* data) {
179 Register registers[] = {cp, r5, r4, r3}; 172 Register registers[] = {cp, r5, r4, r3};
180 data->Initialize(arraysize(registers), registers, NULL); 173 data->InitializePlatformSpecific(arraysize(registers), registers);
181 } 174 }
182 175
183 176
184 void TransitionElementsKindDescriptor::Initialize( 177 void TransitionElementsKindDescriptor::InitializePlatformSpecific(
185 CallInterfaceDescriptorData* data) { 178 CallInterfaceDescriptorData* data) {
186 Register registers[] = {cp, r3, r4}; 179 Register registers[] = {cp, r3, r4};
187 data->Initialize(arraysize(registers), registers, NULL); 180 data->InitializePlatformSpecific(arraysize(registers), registers);
188 } 181 }
189 182
190 183
191 void AllocateHeapNumberDescriptor::Initialize( 184 void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
192 CallInterfaceDescriptorData* data) { 185 CallInterfaceDescriptorData* data) {
193 // register state 186 // register state
194 // cp -- context 187 // cp -- context
195 Register registers[] = {cp}; 188 Register registers[] = {cp};
196 data->Initialize(arraysize(registers), registers, nullptr); 189 data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
197 } 190 }
198 191
199 192
200 void ArrayConstructorConstantArgCountDescriptor::Initialize( 193 void ArrayConstructorConstantArgCountDescriptor::InitializePlatformSpecific(
201 CallInterfaceDescriptorData* data) { 194 CallInterfaceDescriptorData* data) {
202 // register state 195 // register state
203 // cp -- context 196 // cp -- context
204 // r3 -- number of arguments 197 // r3 -- number of arguments
205 // r4 -- function 198 // r4 -- function
206 // r5 -- allocation site with elements kind 199 // r5 -- allocation site with elements kind
207 Register registers[] = {cp, r4, r5}; 200 Register registers[] = {cp, r4, r5};
208 data->Initialize(arraysize(registers), registers, NULL); 201 data->InitializePlatformSpecific(arraysize(registers), registers);
209 } 202 }
210 203
211 204
212 void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 205 void ArrayConstructorDescriptor::InitializePlatformSpecific(
206 CallInterfaceDescriptorData* data) {
213 // stack param count needs (constructor pointer, and single argument) 207 // stack param count needs (constructor pointer, and single argument)
214 Register registers[] = {cp, r4, r5, r3}; 208 Register registers[] = {cp, r4, r5, r3};
215 Representation representations[] = { 209 data->InitializePlatformSpecific(arraysize(registers), registers);
216 Representation::Tagged(), Representation::Tagged(),
217 Representation::Tagged(), Representation::Integer32()};
218 data->Initialize(arraysize(registers), registers, representations);
219 } 210 }
220 211
221 212
222 void InternalArrayConstructorConstantArgCountDescriptor::Initialize( 213 void InternalArrayConstructorConstantArgCountDescriptor::
223 CallInterfaceDescriptorData* data) { 214 InitializePlatformSpecific(CallInterfaceDescriptorData* data) {
224 // register state 215 // register state
225 // cp -- context 216 // cp -- context
226 // r3 -- number of arguments 217 // r3 -- number of arguments
227 // r4 -- constructor function 218 // r4 -- constructor function
228 Register registers[] = {cp, r4}; 219 Register registers[] = {cp, r4};
229 data->Initialize(arraysize(registers), registers, NULL); 220 data->InitializePlatformSpecific(arraysize(registers), registers);
230 } 221 }
231 222
232 223
233 void InternalArrayConstructorDescriptor::Initialize( 224 void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
234 CallInterfaceDescriptorData* data) { 225 CallInterfaceDescriptorData* data) {
235 // stack param count needs (constructor pointer, and single argument) 226 // stack param count needs (constructor pointer, and single argument)
236 Register registers[] = {cp, r4, r3}; 227 Register registers[] = {cp, r4, r3};
237 Representation representations[] = {Representation::Tagged(), 228 data->InitializePlatformSpecific(arraysize(registers), registers);
238 Representation::Tagged(),
239 Representation::Integer32()};
240 data->Initialize(arraysize(registers), registers, representations);
241 } 229 }
242 230
243 231
244 void CompareDescriptor::Initialize(CallInterfaceDescriptorData* data) { 232 void CompareDescriptor::InitializePlatformSpecific(
233 CallInterfaceDescriptorData* data) {
245 Register registers[] = {cp, r4, r3}; 234 Register registers[] = {cp, r4, r3};
246 data->Initialize(arraysize(registers), registers, NULL); 235 data->InitializePlatformSpecific(arraysize(registers), registers);
247 } 236 }
248 237
249 238
250 void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) { 239 void CompareNilDescriptor::InitializePlatformSpecific(
240 CallInterfaceDescriptorData* data) {
251 Register registers[] = {cp, r3}; 241 Register registers[] = {cp, r3};
252 data->Initialize(arraysize(registers), registers, NULL); 242 data->InitializePlatformSpecific(arraysize(registers), registers);
253 } 243 }
254 244
255 245
256 void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) { 246 void ToBooleanDescriptor::InitializePlatformSpecific(
247 CallInterfaceDescriptorData* data) {
257 Register registers[] = {cp, r3}; 248 Register registers[] = {cp, r3};
258 data->Initialize(arraysize(registers), registers, NULL); 249 data->InitializePlatformSpecific(arraysize(registers), registers);
259 } 250 }
260 251
261 252
262 void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) { 253 void BinaryOpDescriptor::InitializePlatformSpecific(
254 CallInterfaceDescriptorData* data) {
263 Register registers[] = {cp, r4, r3}; 255 Register registers[] = {cp, r4, r3};
264 data->Initialize(arraysize(registers), registers, NULL); 256 data->InitializePlatformSpecific(arraysize(registers), registers);
265 } 257 }
266 258
267 259
268 void BinaryOpWithAllocationSiteDescriptor::Initialize( 260 void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
269 CallInterfaceDescriptorData* data) { 261 CallInterfaceDescriptorData* data) {
270 Register registers[] = {cp, r5, r4, r3}; 262 Register registers[] = {cp, r5, r4, r3};
271 data->Initialize(arraysize(registers), registers, NULL); 263 data->InitializePlatformSpecific(arraysize(registers), registers);
272 } 264 }
273 265
274 266
275 void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) { 267 void StringAddDescriptor::InitializePlatformSpecific(
268 CallInterfaceDescriptorData* data) {
276 Register registers[] = {cp, r4, r3}; 269 Register registers[] = {cp, r4, r3};
277 data->Initialize(arraysize(registers), registers, NULL); 270 data->InitializePlatformSpecific(arraysize(registers), registers);
278 } 271 }
279 272
280 273
281 void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) { 274 void KeyedDescriptor::InitializePlatformSpecific(
275 CallInterfaceDescriptorData* data) {
282 Register registers[] = { 276 Register registers[] = {
283 cp, // context 277 cp, // context
284 r5, // key 278 r5, // key
285 }; 279 };
286 Representation representations[] = { 280 data->InitializePlatformSpecific(arraysize(registers), registers);
287 Representation::Tagged(), // context
288 Representation::Tagged(), // key
289 };
290 data->Initialize(arraysize(registers), registers, representations);
291 } 281 }
292 282
293 283
294 void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) { 284 void NamedDescriptor::InitializePlatformSpecific(
285 CallInterfaceDescriptorData* data) {
295 Register registers[] = { 286 Register registers[] = {
296 cp, // context 287 cp, // context
297 r5, // name 288 r5, // name
298 }; 289 };
299 Representation representations[] = { 290 data->InitializePlatformSpecific(arraysize(registers), registers);
300 Representation::Tagged(), // context
301 Representation::Tagged(), // name
302 };
303 data->Initialize(arraysize(registers), registers, representations);
304 } 291 }
305 292
306 293
307 void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) { 294 void CallHandlerDescriptor::InitializePlatformSpecific(
295 CallInterfaceDescriptorData* data) {
308 Register registers[] = { 296 Register registers[] = {
309 cp, // context 297 cp, // context
310 r3, // receiver 298 r3, // receiver
311 }; 299 };
312 Representation representations[] = { 300 data->InitializePlatformSpecific(arraysize(registers), registers);
313 Representation::Tagged(), // context
314 Representation::Tagged(), // receiver
315 };
316 data->Initialize(arraysize(registers), registers, representations);
317 } 301 }
318 302
319 303
320 void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 304 void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
305 CallInterfaceDescriptorData* data) {
321 Register registers[] = { 306 Register registers[] = {
322 cp, // context 307 cp, // context
323 r4, // JSFunction 308 r4, // JSFunction
324 r3, // actual number of arguments 309 r3, // actual number of arguments
325 r5, // expected number of arguments 310 r5, // expected number of arguments
326 }; 311 };
327 Representation representations[] = { 312 data->InitializePlatformSpecific(arraysize(registers), registers);
328 Representation::Tagged(), // context
329 Representation::Tagged(), // JSFunction
330 Representation::Integer32(), // actual number of arguments
331 Representation::Integer32(), // expected number of arguments
332 };
333 data->Initialize(arraysize(registers), registers, representations);
334 } 313 }
335 314
336 315
337 void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { 316 void ApiFunctionDescriptor::InitializePlatformSpecific(
317 CallInterfaceDescriptorData* data) {
338 Register registers[] = { 318 Register registers[] = {
339 cp, // context 319 cp, // context
340 r3, // callee 320 r3, // callee
341 r7, // call_data 321 r7, // call_data
342 r5, // holder 322 r5, // holder
343 r4, // api_function_address 323 r4, // api_function_address
344 r6, // actual number of arguments 324 r6, // actual number of arguments
345 }; 325 };
346 Representation representations[] = { 326 data->InitializePlatformSpecific(arraysize(registers), registers);
347 Representation::Tagged(), // context
348 Representation::Tagged(), // callee
349 Representation::Tagged(), // call_data
350 Representation::Tagged(), // holder
351 Representation::External(), // api_function_address
352 Representation::Integer32(), // actual number of arguments
353 };
354 data->Initialize(arraysize(registers), registers, representations);
355 } 327 }
356 328
357 329
358 void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 330 void ApiAccessorDescriptor::InitializePlatformSpecific(
331 CallInterfaceDescriptorData* data) {
359 Register registers[] = { 332 Register registers[] = {
360 cp, // context 333 cp, // context
361 r3, // callee 334 r3, // callee
362 r7, // call_data 335 r7, // call_data
363 r5, // holder 336 r5, // holder
364 r4, // api_function_address 337 r4, // api_function_address
365 }; 338 };
366 Representation representations[] = { 339 data->InitializePlatformSpecific(arraysize(registers), registers);
367 Representation::Tagged(), // context
368 Representation::Tagged(), // callee
369 Representation::Tagged(), // call_data
370 Representation::Tagged(), // holder
371 Representation::External(), // api_function_address
372 };
373 data->Initialize(arraysize(registers), registers, representations);
374 } 340 }
375 341
376 342
377 void MathRoundVariantDescriptor::Initialize(CallInterfaceDescriptorData* data) { 343 void MathRoundVariantDescriptor::InitializePlatformSpecific(
344 CallInterfaceDescriptorData* data) {
378 Register registers[] = { 345 Register registers[] = {
379 cp, // context 346 cp, // context
380 r4, // math rounding function 347 r4, // math rounding function
381 r6, // vector slot id 348 r6, // vector slot id
382 }; 349 };
383 Representation representations[] = { 350 data->InitializePlatformSpecific(arraysize(registers), registers);
384 Representation::Tagged(), //
385 Representation::Tagged(), //
386 Representation::Tagged(), //
387 };
388 data->Initialize(arraysize(registers), registers, representations);
389 } 351 }
390 } // namespace internal 352 } // namespace internal
391 } // namespace v8 353 } // namespace v8
392 354
393 #endif // V8_TARGET_ARCH_PPC 355 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698