OLD | NEW |
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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void CompareNilICStub::InitializeInterfaceDescriptor( | 116 void CompareNilICStub::InitializeInterfaceDescriptor( |
117 CodeStubInterfaceDescriptor* descriptor) { | 117 CodeStubInterfaceDescriptor* descriptor) { |
118 Register registers[] = { cp, a0 }; | 118 Register registers[] = { cp, a0 }; |
119 descriptor->Initialize(MajorKey(), arraysize(registers), registers, | 119 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
120 FUNCTION_ADDR(CompareNilIC_Miss)); | 120 FUNCTION_ADDR(CompareNilIC_Miss)); |
121 descriptor->SetMissHandler( | 121 descriptor->SetMissHandler( |
122 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 122 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
123 } | 123 } |
124 | 124 |
125 | 125 |
126 const Register InterfaceDescriptor::ContextRegister() { return cp; } | |
127 | |
128 | |
129 static void InitializeArrayConstructorDescriptor( | 126 static void InitializeArrayConstructorDescriptor( |
130 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, | 127 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
131 int constant_stack_parameter_count) { | 128 int constant_stack_parameter_count) { |
132 // register state | 129 // register state |
133 // cp -- context | 130 // cp -- context |
134 // a0 -- number of arguments | 131 // a0 -- number of arguments |
135 // a1 -- function | 132 // a1 -- function |
136 // a2 -- allocation site with elements kind | 133 // a2 -- allocation site with elements kind |
137 Address deopt_handler = Runtime::FunctionForId( | 134 Address deopt_handler = Runtime::FunctionForId( |
138 Runtime::kArrayConstructor)->entry; | 135 Runtime::kArrayConstructor)->entry; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 250 |
254 | 251 |
255 void StringAddStub::InitializeInterfaceDescriptor( | 252 void StringAddStub::InitializeInterfaceDescriptor( |
256 CodeStubInterfaceDescriptor* descriptor) { | 253 CodeStubInterfaceDescriptor* descriptor) { |
257 Register registers[] = { cp, a1, a0 }; | 254 Register registers[] = { cp, a1, a0 }; |
258 descriptor->Initialize(MajorKey(), arraysize(registers), registers, | 255 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
259 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | 256 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
260 } | 257 } |
261 | 258 |
262 | 259 |
263 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | |
264 { | |
265 CallInterfaceDescriptor* descriptor = | |
266 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); | |
267 Register registers[] = { cp, // context | |
268 a1, // JSFunction | |
269 a0, // actual number of arguments | |
270 a2, // expected number of arguments | |
271 }; | |
272 Representation representations[] = { | |
273 Representation::Tagged(), // context | |
274 Representation::Tagged(), // JSFunction | |
275 Representation::Integer32(), // actual number of arguments | |
276 Representation::Integer32(), // expected number of arguments | |
277 }; | |
278 descriptor->Initialize(arraysize(registers), registers, representations); | |
279 } | |
280 { | |
281 CallInterfaceDescriptor* descriptor = | |
282 isolate->call_descriptor(Isolate::KeyedCall); | |
283 Register registers[] = { cp, // context | |
284 a2, // key | |
285 }; | |
286 Representation representations[] = { | |
287 Representation::Tagged(), // context | |
288 Representation::Tagged(), // key | |
289 }; | |
290 descriptor->Initialize(arraysize(registers), registers, representations); | |
291 } | |
292 { | |
293 CallInterfaceDescriptor* descriptor = | |
294 isolate->call_descriptor(Isolate::NamedCall); | |
295 Register registers[] = { cp, // context | |
296 a2, // name | |
297 }; | |
298 Representation representations[] = { | |
299 Representation::Tagged(), // context | |
300 Representation::Tagged(), // name | |
301 }; | |
302 descriptor->Initialize(arraysize(registers), registers, representations); | |
303 } | |
304 { | |
305 CallInterfaceDescriptor* descriptor = | |
306 isolate->call_descriptor(Isolate::CallHandler); | |
307 Register registers[] = { cp, // context | |
308 a0, // receiver | |
309 }; | |
310 Representation representations[] = { | |
311 Representation::Tagged(), // context | |
312 Representation::Tagged(), // receiver | |
313 }; | |
314 descriptor->Initialize(arraysize(registers), registers, representations); | |
315 } | |
316 { | |
317 CallInterfaceDescriptor* descriptor = | |
318 isolate->call_descriptor(Isolate::ApiFunctionCall); | |
319 Register registers[] = { cp, // context | |
320 a0, // callee | |
321 a4, // call_data | |
322 a2, // holder | |
323 a1, // api_function_address | |
324 }; | |
325 Representation representations[] = { | |
326 Representation::Tagged(), // context | |
327 Representation::Tagged(), // callee | |
328 Representation::Tagged(), // call_data | |
329 Representation::Tagged(), // holder | |
330 Representation::External(), // api_function_address | |
331 }; | |
332 descriptor->Initialize(arraysize(registers), registers, representations); | |
333 } | |
334 } | |
335 | |
336 | |
337 #define __ ACCESS_MASM(masm) | 260 #define __ ACCESS_MASM(masm) |
338 | 261 |
339 | 262 |
340 static void EmitIdenticalObjectComparison(MacroAssembler* masm, | 263 static void EmitIdenticalObjectComparison(MacroAssembler* masm, |
341 Label* slow, | 264 Label* slow, |
342 Condition cc); | 265 Condition cc); |
343 static void EmitSmiNonsmiComparison(MacroAssembler* masm, | 266 static void EmitSmiNonsmiComparison(MacroAssembler* masm, |
344 Register lhs, | 267 Register lhs, |
345 Register rhs, | 268 Register rhs, |
346 Label* rhs_not_nan, | 269 Label* rhs_not_nan, |
(...skipping 4990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5337 MemOperand(fp, 6 * kPointerSize), | 5260 MemOperand(fp, 6 * kPointerSize), |
5338 NULL); | 5261 NULL); |
5339 } | 5262 } |
5340 | 5263 |
5341 | 5264 |
5342 #undef __ | 5265 #undef __ |
5343 | 5266 |
5344 } } // namespace v8::internal | 5267 } } // namespace v8::internal |
5345 | 5268 |
5346 #endif // V8_TARGET_ARCH_MIPS64 | 5269 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |