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_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
11 #include "src/regexp-macro-assembler.h" | 11 #include "src/regexp-macro-assembler.h" |
12 #include "src/stub-cache.h" | 12 #include "src/stub-cache.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 | 17 |
18 void FastNewClosureStub::InitializeInterfaceDescriptor( | 18 void FastNewClosureStub::InitializeInterfaceDescriptor( |
19 CodeStubInterfaceDescriptor* descriptor) { | 19 CodeStubInterfaceDescriptor* descriptor) { |
20 Register registers[] = { r2 }; | 20 Register registers[] = { cp, r2 }; |
21 descriptor->Initialize( | 21 descriptor->Initialize( |
22 ARRAY_SIZE(registers), registers, | 22 ARRAY_SIZE(registers), registers, |
23 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); | 23 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); |
24 } | 24 } |
25 | 25 |
26 | 26 |
27 void FastNewContextStub::InitializeInterfaceDescriptor( | 27 void FastNewContextStub::InitializeInterfaceDescriptor( |
28 CodeStubInterfaceDescriptor* descriptor) { | 28 CodeStubInterfaceDescriptor* descriptor) { |
29 Register registers[] = { r1 }; | 29 Register registers[] = { cp, r1 }; |
30 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 30 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 void ToNumberStub::InitializeInterfaceDescriptor( | 34 void ToNumberStub::InitializeInterfaceDescriptor( |
35 CodeStubInterfaceDescriptor* descriptor) { | 35 CodeStubInterfaceDescriptor* descriptor) { |
36 Register registers[] = { r0 }; | 36 Register registers[] = { cp, r0 }; |
37 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 37 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 void NumberToStringStub::InitializeInterfaceDescriptor( | 41 void NumberToStringStub::InitializeInterfaceDescriptor( |
42 CodeStubInterfaceDescriptor* descriptor) { | 42 CodeStubInterfaceDescriptor* descriptor) { |
43 Register registers[] = { r0 }; | 43 Register registers[] = { cp, r0 }; |
44 descriptor->Initialize( | 44 descriptor->Initialize( |
45 ARRAY_SIZE(registers), registers, | 45 ARRAY_SIZE(registers), registers, |
46 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); | 46 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); |
47 } | 47 } |
48 | 48 |
49 | 49 |
50 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 50 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
51 CodeStubInterfaceDescriptor* descriptor) { | 51 CodeStubInterfaceDescriptor* descriptor) { |
52 Register registers[] = { r3, r2, r1 }; | 52 Register registers[] = { cp, r3, r2, r1 }; |
53 Representation representations[] = { | 53 Representation representations[] = { |
54 Representation::Tagged(), | 54 Representation::Tagged(), |
| 55 Representation::Tagged(), |
55 Representation::Smi(), | 56 Representation::Smi(), |
56 Representation::Tagged() }; | 57 Representation::Tagged() }; |
57 descriptor->Initialize( | 58 descriptor->Initialize( |
58 ARRAY_SIZE(registers), registers, | 59 ARRAY_SIZE(registers), registers, |
59 Runtime::FunctionForId( | 60 Runtime::FunctionForId( |
60 Runtime::kCreateArrayLiteralStubBailout)->entry, | 61 Runtime::kCreateArrayLiteralStubBailout)->entry, |
61 representations); | 62 representations); |
62 } | 63 } |
63 | 64 |
64 | 65 |
65 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 66 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
66 CodeStubInterfaceDescriptor* descriptor) { | 67 CodeStubInterfaceDescriptor* descriptor) { |
67 Register registers[] = { r3, r2, r1, r0 }; | 68 Register registers[] = { cp, r3, r2, r1, r0 }; |
68 descriptor->Initialize( | 69 descriptor->Initialize( |
69 ARRAY_SIZE(registers), registers, | 70 ARRAY_SIZE(registers), registers, |
70 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); | 71 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); |
71 } | 72 } |
72 | 73 |
73 | 74 |
74 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 75 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
75 CodeStubInterfaceDescriptor* descriptor) { | 76 CodeStubInterfaceDescriptor* descriptor) { |
76 Register registers[] = { r2, r3 }; | 77 Register registers[] = { cp, r2, r3 }; |
77 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 78 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
78 } | 79 } |
79 | 80 |
80 | 81 |
81 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 82 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
82 CodeStubInterfaceDescriptor* descriptor) { | 83 CodeStubInterfaceDescriptor* descriptor) { |
83 Register registers[] = { r2, r1, r0 }; | 84 Register registers[] = { cp, r2, r1, r0 }; |
84 descriptor->Initialize( | 85 descriptor->Initialize( |
85 ARRAY_SIZE(registers), registers, | 86 ARRAY_SIZE(registers), registers, |
86 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 87 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
87 } | 88 } |
88 | 89 |
89 | 90 |
90 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 91 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
91 CodeStubInterfaceDescriptor* descriptor) { | 92 CodeStubInterfaceDescriptor* descriptor) { |
92 Register registers[] = { r0, r1 }; | 93 Register registers[] = { cp, r0, r1 }; |
93 Address entry = | 94 Address entry = |
94 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; | 95 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; |
95 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 96 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
96 FUNCTION_ADDR(entry)); | 97 FUNCTION_ADDR(entry)); |
97 } | 98 } |
98 | 99 |
99 | 100 |
100 void CompareNilICStub::InitializeInterfaceDescriptor( | 101 void CompareNilICStub::InitializeInterfaceDescriptor( |
101 CodeStubInterfaceDescriptor* descriptor) { | 102 CodeStubInterfaceDescriptor* descriptor) { |
102 Register registers[] = { r0 }; | 103 Register registers[] = { cp, r0 }; |
103 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 104 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
104 FUNCTION_ADDR(CompareNilIC_Miss)); | 105 FUNCTION_ADDR(CompareNilIC_Miss)); |
105 descriptor->SetMissHandler( | 106 descriptor->SetMissHandler( |
106 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 107 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
107 } | 108 } |
108 | 109 |
109 | 110 |
| 111 const Register InterfaceDescriptor::ContextRegister() { return cp; } |
| 112 |
| 113 |
110 static void InitializeArrayConstructorDescriptor( | 114 static void InitializeArrayConstructorDescriptor( |
111 CodeStubInterfaceDescriptor* descriptor, | 115 CodeStubInterfaceDescriptor* descriptor, |
112 int constant_stack_parameter_count) { | 116 int constant_stack_parameter_count) { |
113 // register state | 117 // register state |
| 118 // cp -- context |
114 // r0 -- number of arguments | 119 // r0 -- number of arguments |
115 // r1 -- function | 120 // r1 -- function |
116 // r2 -- allocation site with elements kind | 121 // r2 -- allocation site with elements kind |
117 Address deopt_handler = Runtime::FunctionForId( | 122 Address deopt_handler = Runtime::FunctionForId( |
118 Runtime::kArrayConstructor)->entry; | 123 Runtime::kArrayConstructor)->entry; |
119 | 124 |
120 if (constant_stack_parameter_count == 0) { | 125 if (constant_stack_parameter_count == 0) { |
121 Register registers[] = { r1, r2 }; | 126 Register registers[] = { cp, r1, r2 }; |
122 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 127 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
123 deopt_handler, | 128 deopt_handler, |
124 NULL, | 129 NULL, |
125 constant_stack_parameter_count, | 130 constant_stack_parameter_count, |
126 JS_FUNCTION_STUB_MODE); | 131 JS_FUNCTION_STUB_MODE); |
127 } else { | 132 } else { |
128 // stack param count needs (constructor pointer, and single argument) | 133 // stack param count needs (constructor pointer, and single argument) |
129 Register registers[] = { r1, r2, r0 }; | 134 Register registers[] = { cp, r1, r2, r0 }; |
130 Representation representations[] = { | 135 Representation representations[] = { |
131 Representation::Tagged(), | 136 Representation::Tagged(), |
132 Representation::Tagged(), | 137 Representation::Tagged(), |
| 138 Representation::Tagged(), |
133 Representation::Integer32() }; | 139 Representation::Integer32() }; |
134 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 140 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
135 r0, | 141 r0, |
136 deopt_handler, | 142 deopt_handler, |
137 representations, | 143 representations, |
138 constant_stack_parameter_count, | 144 constant_stack_parameter_count, |
139 JS_FUNCTION_STUB_MODE, | 145 JS_FUNCTION_STUB_MODE, |
140 PASS_ARGUMENTS); | 146 PASS_ARGUMENTS); |
141 } | 147 } |
142 } | 148 } |
143 | 149 |
144 | 150 |
145 static void InitializeInternalArrayConstructorDescriptor( | 151 static void InitializeInternalArrayConstructorDescriptor( |
146 CodeStubInterfaceDescriptor* descriptor, | 152 CodeStubInterfaceDescriptor* descriptor, |
147 int constant_stack_parameter_count) { | 153 int constant_stack_parameter_count) { |
148 // register state | 154 // register state |
| 155 // cp -- context |
149 // r0 -- number of arguments | 156 // r0 -- number of arguments |
150 // r1 -- constructor function | 157 // r1 -- constructor function |
151 Address deopt_handler = Runtime::FunctionForId( | 158 Address deopt_handler = Runtime::FunctionForId( |
152 Runtime::kInternalArrayConstructor)->entry; | 159 Runtime::kInternalArrayConstructor)->entry; |
153 | 160 |
154 if (constant_stack_parameter_count == 0) { | 161 if (constant_stack_parameter_count == 0) { |
155 Register registers[] = { r1 }; | 162 Register registers[] = { cp, r1 }; |
156 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 163 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
157 deopt_handler, | 164 deopt_handler, |
158 NULL, | 165 NULL, |
159 constant_stack_parameter_count, | 166 constant_stack_parameter_count, |
160 JS_FUNCTION_STUB_MODE); | 167 JS_FUNCTION_STUB_MODE); |
161 } else { | 168 } else { |
162 // stack param count needs (constructor pointer, and single argument) | 169 // stack param count needs (constructor pointer, and single argument) |
163 Register registers[] = { r1, r0 }; | 170 Register registers[] = { cp, r1, r0 }; |
164 Representation representations[] = { | 171 Representation representations[] = { |
165 Representation::Tagged(), | 172 Representation::Tagged(), |
| 173 Representation::Tagged(), |
166 Representation::Integer32() }; | 174 Representation::Integer32() }; |
167 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 175 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
168 r0, | 176 r0, |
169 deopt_handler, | 177 deopt_handler, |
170 representations, | 178 representations, |
171 constant_stack_parameter_count, | 179 constant_stack_parameter_count, |
172 JS_FUNCTION_STUB_MODE, | 180 JS_FUNCTION_STUB_MODE, |
173 PASS_ARGUMENTS); | 181 PASS_ARGUMENTS); |
174 } | 182 } |
175 } | 183 } |
(...skipping 12 matching lines...) Expand all Loading... |
188 | 196 |
189 | 197 |
190 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 198 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
191 CodeStubInterfaceDescriptor* descriptor) { | 199 CodeStubInterfaceDescriptor* descriptor) { |
192 InitializeArrayConstructorDescriptor(descriptor, -1); | 200 InitializeArrayConstructorDescriptor(descriptor, -1); |
193 } | 201 } |
194 | 202 |
195 | 203 |
196 void ToBooleanStub::InitializeInterfaceDescriptor( | 204 void ToBooleanStub::InitializeInterfaceDescriptor( |
197 CodeStubInterfaceDescriptor* descriptor) { | 205 CodeStubInterfaceDescriptor* descriptor) { |
198 Register registers[] = { r0 }; | 206 Register registers[] = { cp, r0 }; |
199 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 207 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
200 FUNCTION_ADDR(ToBooleanIC_Miss)); | 208 FUNCTION_ADDR(ToBooleanIC_Miss)); |
201 descriptor->SetMissHandler( | 209 descriptor->SetMissHandler( |
202 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); | 210 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); |
203 } | 211 } |
204 | 212 |
205 | 213 |
206 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 214 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
207 CodeStubInterfaceDescriptor* descriptor) { | 215 CodeStubInterfaceDescriptor* descriptor) { |
208 InitializeInternalArrayConstructorDescriptor(descriptor, 0); | 216 InitializeInternalArrayConstructorDescriptor(descriptor, 0); |
209 } | 217 } |
210 | 218 |
211 | 219 |
212 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( | 220 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( |
213 CodeStubInterfaceDescriptor* descriptor) { | 221 CodeStubInterfaceDescriptor* descriptor) { |
214 InitializeInternalArrayConstructorDescriptor(descriptor, 1); | 222 InitializeInternalArrayConstructorDescriptor(descriptor, 1); |
215 } | 223 } |
216 | 224 |
217 | 225 |
218 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 226 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
219 CodeStubInterfaceDescriptor* descriptor) { | 227 CodeStubInterfaceDescriptor* descriptor) { |
220 InitializeInternalArrayConstructorDescriptor(descriptor, -1); | 228 InitializeInternalArrayConstructorDescriptor(descriptor, -1); |
221 } | 229 } |
222 | 230 |
223 | 231 |
224 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( | 232 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( |
225 CodeStubInterfaceDescriptor* descriptor) { | 233 CodeStubInterfaceDescriptor* descriptor) { |
226 Register registers[] = { r0, r3, r1, r2 }; | 234 Register registers[] = { cp, r0, r3, r1, r2 }; |
227 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 235 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
228 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); | 236 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); |
229 } | 237 } |
230 | 238 |
231 | 239 |
232 void BinaryOpICStub::InitializeInterfaceDescriptor( | 240 void BinaryOpICStub::InitializeInterfaceDescriptor( |
233 CodeStubInterfaceDescriptor* descriptor) { | 241 CodeStubInterfaceDescriptor* descriptor) { |
234 Register registers[] = { r1, r0 }; | 242 Register registers[] = { cp, r1, r0 }; |
235 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 243 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
236 FUNCTION_ADDR(BinaryOpIC_Miss)); | 244 FUNCTION_ADDR(BinaryOpIC_Miss)); |
237 descriptor->SetMissHandler( | 245 descriptor->SetMissHandler( |
238 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); | 246 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); |
239 } | 247 } |
240 | 248 |
241 | 249 |
242 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( | 250 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( |
243 CodeStubInterfaceDescriptor* descriptor) { | 251 CodeStubInterfaceDescriptor* descriptor) { |
244 Register registers[] = { r2, r1, r0 }; | 252 Register registers[] = { cp, r2, r1, r0 }; |
245 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 253 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
246 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); | 254 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); |
247 } | 255 } |
248 | 256 |
249 | 257 |
250 void StringAddStub::InitializeInterfaceDescriptor( | 258 void StringAddStub::InitializeInterfaceDescriptor( |
251 CodeStubInterfaceDescriptor* descriptor) { | 259 CodeStubInterfaceDescriptor* descriptor) { |
252 Register registers[] = { r1, r0 }; | 260 Register registers[] = { cp, r1, r0 }; |
253 descriptor->Initialize( | 261 descriptor->Initialize( |
254 ARRAY_SIZE(registers), registers, | 262 ARRAY_SIZE(registers), registers, |
255 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | 263 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
256 } | 264 } |
257 | 265 |
258 | 266 |
259 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 267 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
260 static PlatformCallInterfaceDescriptor default_descriptor = | 268 static PlatformInterfaceDescriptor default_descriptor = |
261 PlatformCallInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); | 269 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); |
262 | 270 |
263 static PlatformCallInterfaceDescriptor noInlineDescriptor = | 271 static PlatformInterfaceDescriptor noInlineDescriptor = |
264 PlatformCallInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); | 272 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); |
265 | 273 |
266 { | 274 { |
267 CallInterfaceDescriptor* descriptor = | 275 CallInterfaceDescriptor* descriptor = |
268 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); | 276 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
269 Register registers[] = { r1, // JSFunction | 277 Register registers[] = { cp, // context |
270 cp, // context | 278 r1, // JSFunction |
271 r0, // actual number of arguments | 279 r0, // actual number of arguments |
272 r2, // expected number of arguments | 280 r2, // expected number of arguments |
273 }; | 281 }; |
274 Representation representations[] = { | 282 Representation representations[] = { |
| 283 Representation::Tagged(), // context |
275 Representation::Tagged(), // JSFunction | 284 Representation::Tagged(), // JSFunction |
276 Representation::Tagged(), // context | |
277 Representation::Integer32(), // actual number of arguments | 285 Representation::Integer32(), // actual number of arguments |
278 Representation::Integer32(), // expected number of arguments | 286 Representation::Integer32(), // expected number of arguments |
279 }; | 287 }; |
280 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 288 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
281 representations, &default_descriptor); | 289 representations, &default_descriptor); |
282 } | 290 } |
283 { | 291 { |
284 CallInterfaceDescriptor* descriptor = | 292 CallInterfaceDescriptor* descriptor = |
285 isolate->call_descriptor(Isolate::KeyedCall); | 293 isolate->call_descriptor(Isolate::KeyedCall); |
286 Register registers[] = { cp, // context | 294 Register registers[] = { cp, // context |
(...skipping 28 matching lines...) Expand all Loading... |
315 Representation representations[] = { | 323 Representation representations[] = { |
316 Representation::Tagged(), // context | 324 Representation::Tagged(), // context |
317 Representation::Tagged(), // receiver | 325 Representation::Tagged(), // receiver |
318 }; | 326 }; |
319 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 327 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
320 representations, &default_descriptor); | 328 representations, &default_descriptor); |
321 } | 329 } |
322 { | 330 { |
323 CallInterfaceDescriptor* descriptor = | 331 CallInterfaceDescriptor* descriptor = |
324 isolate->call_descriptor(Isolate::ApiFunctionCall); | 332 isolate->call_descriptor(Isolate::ApiFunctionCall); |
325 Register registers[] = { r0, // callee | 333 Register registers[] = { cp, // context |
| 334 r0, // callee |
326 r4, // call_data | 335 r4, // call_data |
327 r2, // holder | 336 r2, // holder |
328 r1, // api_function_address | 337 r1, // api_function_address |
329 cp, // context | |
330 }; | 338 }; |
331 Representation representations[] = { | 339 Representation representations[] = { |
| 340 Representation::Tagged(), // context |
332 Representation::Tagged(), // callee | 341 Representation::Tagged(), // callee |
333 Representation::Tagged(), // call_data | 342 Representation::Tagged(), // call_data |
334 Representation::Tagged(), // holder | 343 Representation::Tagged(), // holder |
335 Representation::External(), // api_function_address | 344 Representation::External(), // api_function_address |
336 Representation::Tagged(), // context | |
337 }; | 345 }; |
338 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 346 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
339 representations, &default_descriptor); | 347 representations, &default_descriptor); |
340 } | 348 } |
341 } | 349 } |
342 | 350 |
343 | 351 |
344 #define __ ACCESS_MASM(masm) | 352 #define __ ACCESS_MASM(masm) |
345 | 353 |
346 | 354 |
347 static void EmitIdenticalObjectComparison(MacroAssembler* masm, | 355 static void EmitIdenticalObjectComparison(MacroAssembler* masm, |
348 Label* slow, | 356 Label* slow, |
349 Condition cond); | 357 Condition cond); |
350 static void EmitSmiNonsmiComparison(MacroAssembler* masm, | 358 static void EmitSmiNonsmiComparison(MacroAssembler* masm, |
351 Register lhs, | 359 Register lhs, |
352 Register rhs, | 360 Register rhs, |
353 Label* lhs_not_nan, | 361 Label* lhs_not_nan, |
354 Label* slow, | 362 Label* slow, |
355 bool strict); | 363 bool strict); |
356 static void EmitStrictTwoHeapObjectCompare(MacroAssembler* masm, | 364 static void EmitStrictTwoHeapObjectCompare(MacroAssembler* masm, |
357 Register lhs, | 365 Register lhs, |
358 Register rhs); | 366 Register rhs); |
359 | 367 |
360 | 368 |
361 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 369 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
362 // Update the static counter each time a new code stub is generated. | 370 // Update the static counter each time a new code stub is generated. |
363 isolate()->counters()->code_stubs()->Increment(); | 371 isolate()->counters()->code_stubs()->Increment(); |
364 | 372 |
365 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); | 373 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); |
366 int param_count = descriptor->register_param_count(); | 374 int param_count = descriptor->GetEnvironmentParameterCount(); |
367 { | 375 { |
368 // Call the runtime system in a fresh internal frame. | 376 // Call the runtime system in a fresh internal frame. |
369 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 377 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
370 ASSERT(descriptor->register_param_count() == 0 || | 378 ASSERT(param_count == 0 || |
371 r0.is(descriptor->GetParameterRegister(param_count - 1))); | 379 r0.is(descriptor->GetEnvironmentParameterRegister( |
| 380 param_count - 1))); |
372 // Push arguments | 381 // Push arguments |
373 for (int i = 0; i < param_count; ++i) { | 382 for (int i = 0; i < param_count; ++i) { |
374 __ push(descriptor->GetParameterRegister(i)); | 383 __ push(descriptor->GetEnvironmentParameterRegister(i)); |
375 } | 384 } |
376 ExternalReference miss = descriptor->miss_handler(); | 385 ExternalReference miss = descriptor->miss_handler(); |
377 __ CallExternalReference(miss, descriptor->register_param_count()); | 386 __ CallExternalReference(miss, param_count); |
378 } | 387 } |
379 | 388 |
380 __ Ret(); | 389 __ Ret(); |
381 } | 390 } |
382 | 391 |
383 | 392 |
384 // Takes a Smi and converts to an IEEE 64 bit floating point value in two | 393 // Takes a Smi and converts to an IEEE 64 bit floating point value in two |
385 // registers. The format is 1 sign bit, 11 exponent bits (biased 1023) and | 394 // registers. The format is 1 sign bit, 11 exponent bits (biased 1023) and |
386 // 52 fraction bits (20 in the first word, 32 in the second). Zeros is a | 395 // 52 fraction bits (20 in the first word, 32 in the second). Zeros is a |
387 // scratch register. Destroys the source register. No GC occurs during this | 396 // scratch register. Destroys the source register. No GC occurs during this |
(...skipping 4675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5063 MemOperand(fp, 6 * kPointerSize), | 5072 MemOperand(fp, 6 * kPointerSize), |
5064 NULL); | 5073 NULL); |
5065 } | 5074 } |
5066 | 5075 |
5067 | 5076 |
5068 #undef __ | 5077 #undef __ |
5069 | 5078 |
5070 } } // namespace v8::internal | 5079 } } // namespace v8::internal |
5071 | 5080 |
5072 #endif // V8_TARGET_ARCH_ARM | 5081 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |