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

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

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

Powered by Google App Engine
This is Rietveld 408576698