OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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/runtime.h" | 12 #include "src/runtime.h" |
13 #include "src/stub-cache.h" | 13 #include "src/stub-cache.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 | 18 |
19 void FastNewClosureStub::InitializeInterfaceDescriptor( | 19 void FastNewClosureStub::InitializeInterfaceDescriptor( |
20 CodeStubInterfaceDescriptor* descriptor) { | 20 CodeStubInterfaceDescriptor* descriptor) { |
21 Register registers[] = { rbx }; | 21 Register registers[] = { rsi, rbx }; |
22 descriptor->Initialize( | 22 descriptor->Initialize( |
23 ARRAY_SIZE(registers), registers, | 23 ARRAY_SIZE(registers), registers, |
24 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); | 24 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); |
25 } | 25 } |
26 | 26 |
27 | 27 |
28 void FastNewContextStub::InitializeInterfaceDescriptor( | 28 void FastNewContextStub::InitializeInterfaceDescriptor( |
29 CodeStubInterfaceDescriptor* descriptor) { | 29 CodeStubInterfaceDescriptor* descriptor) { |
30 Register registers[] = { rdi }; | 30 Register registers[] = { rsi, rdi }; |
31 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 31 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
32 } | 32 } |
33 | 33 |
34 | 34 |
35 void ToNumberStub::InitializeInterfaceDescriptor( | 35 void ToNumberStub::InitializeInterfaceDescriptor( |
36 CodeStubInterfaceDescriptor* descriptor) { | 36 CodeStubInterfaceDescriptor* descriptor) { |
37 Register registers[] = { rax }; | 37 Register registers[] = { rsi, rax }; |
38 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 38 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 void NumberToStringStub::InitializeInterfaceDescriptor( | 42 void NumberToStringStub::InitializeInterfaceDescriptor( |
43 CodeStubInterfaceDescriptor* descriptor) { | 43 CodeStubInterfaceDescriptor* descriptor) { |
44 Register registers[] = { rax }; | 44 Register registers[] = { rsi, rax }; |
45 descriptor->Initialize( | 45 descriptor->Initialize( |
46 ARRAY_SIZE(registers), registers, | 46 ARRAY_SIZE(registers), registers, |
47 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); | 47 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 51 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
52 CodeStubInterfaceDescriptor* descriptor) { | 52 CodeStubInterfaceDescriptor* descriptor) { |
53 Register registers[] = { rax, rbx, rcx }; | 53 Register registers[] = { rsi, rax, rbx, rcx }; |
54 Representation representations[] = { | 54 Representation representations[] = { |
55 Representation::Tagged(), | 55 Representation::Tagged(), |
| 56 Representation::Tagged(), |
56 Representation::Smi(), | 57 Representation::Smi(), |
57 Representation::Tagged() }; | 58 Representation::Tagged() }; |
58 | 59 |
59 descriptor->Initialize( | 60 descriptor->Initialize( |
60 ARRAY_SIZE(registers), registers, | 61 ARRAY_SIZE(registers), registers, |
61 Runtime::FunctionForId( | 62 Runtime::FunctionForId( |
62 Runtime::kCreateArrayLiteralStubBailout)->entry, | 63 Runtime::kCreateArrayLiteralStubBailout)->entry, |
63 representations); | 64 representations); |
64 } | 65 } |
65 | 66 |
66 | 67 |
67 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 68 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
68 CodeStubInterfaceDescriptor* descriptor) { | 69 CodeStubInterfaceDescriptor* descriptor) { |
69 Register registers[] = { rax, rbx, rcx, rdx }; | 70 Register registers[] = { rsi, rax, rbx, rcx, rdx }; |
70 descriptor->Initialize( | 71 descriptor->Initialize( |
71 ARRAY_SIZE(registers), registers, | 72 ARRAY_SIZE(registers), registers, |
72 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); | 73 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); |
73 } | 74 } |
74 | 75 |
75 | 76 |
76 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 77 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
77 CodeStubInterfaceDescriptor* descriptor) { | 78 CodeStubInterfaceDescriptor* descriptor) { |
78 Register registers[] = { rbx, rdx }; | 79 Register registers[] = { rsi, rbx, rdx }; |
79 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 80 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
80 } | 81 } |
81 | 82 |
82 | 83 |
83 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 84 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
84 CodeStubInterfaceDescriptor* descriptor) { | 85 CodeStubInterfaceDescriptor* descriptor) { |
85 Register registers[] = { rcx, rbx, rax }; | 86 Register registers[] = { rsi, rcx, rbx, rax }; |
86 descriptor->Initialize( | 87 descriptor->Initialize( |
87 ARRAY_SIZE(registers), registers, | 88 ARRAY_SIZE(registers), registers, |
88 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 89 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
89 } | 90 } |
90 | 91 |
91 | 92 |
92 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 93 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
93 CodeStubInterfaceDescriptor* descriptor) { | 94 CodeStubInterfaceDescriptor* descriptor) { |
94 Register registers[] = { rax, rbx }; | 95 Register registers[] = { rsi, rax, rbx }; |
95 descriptor->Initialize( | 96 descriptor->Initialize( |
96 ARRAY_SIZE(registers), registers, | 97 ARRAY_SIZE(registers), registers, |
97 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); | 98 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); |
98 } | 99 } |
99 | 100 |
100 | 101 |
| 102 const Register InterfaceDescriptor::ContextRegister() { return rsi; } |
| 103 |
| 104 |
101 static void InitializeArrayConstructorDescriptor( | 105 static void InitializeArrayConstructorDescriptor( |
102 CodeStubInterfaceDescriptor* descriptor, | 106 CodeStubInterfaceDescriptor* descriptor, |
103 int constant_stack_parameter_count) { | 107 int constant_stack_parameter_count) { |
104 // register state | 108 // register state |
105 // rax -- number of arguments | 109 // rax -- number of arguments |
106 // rdi -- function | 110 // rdi -- function |
107 // rbx -- allocation site with elements kind | 111 // rbx -- allocation site with elements kind |
108 Address deopt_handler = Runtime::FunctionForId( | 112 Address deopt_handler = Runtime::FunctionForId( |
109 Runtime::kArrayConstructor)->entry; | 113 Runtime::kArrayConstructor)->entry; |
110 | 114 |
111 if (constant_stack_parameter_count == 0) { | 115 if (constant_stack_parameter_count == 0) { |
112 Register registers[] = { rdi, rbx }; | 116 Register registers[] = { rsi, rdi, rbx }; |
113 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 117 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
114 deopt_handler, | 118 deopt_handler, |
115 NULL, | 119 NULL, |
116 constant_stack_parameter_count, | 120 constant_stack_parameter_count, |
117 JS_FUNCTION_STUB_MODE); | 121 JS_FUNCTION_STUB_MODE); |
118 } else { | 122 } else { |
119 // stack param count needs (constructor pointer, and single argument) | 123 // stack param count needs (constructor pointer, and single argument) |
120 Register registers[] = { rdi, rbx, rax }; | 124 Register registers[] = { rsi, rdi, rbx, rax }; |
121 Representation representations[] = { | 125 Representation representations[] = { |
122 Representation::Tagged(), | 126 Representation::Tagged(), |
123 Representation::Tagged(), | 127 Representation::Tagged(), |
| 128 Representation::Tagged(), |
124 Representation::Integer32() }; | 129 Representation::Integer32() }; |
125 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 130 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
126 rax, | 131 rax, |
127 deopt_handler, | 132 deopt_handler, |
128 representations, | 133 representations, |
129 constant_stack_parameter_count, | 134 constant_stack_parameter_count, |
130 JS_FUNCTION_STUB_MODE, | 135 JS_FUNCTION_STUB_MODE, |
131 PASS_ARGUMENTS); | 136 PASS_ARGUMENTS); |
132 } | 137 } |
133 } | 138 } |
134 | 139 |
135 | 140 |
136 static void InitializeInternalArrayConstructorDescriptor( | 141 static void InitializeInternalArrayConstructorDescriptor( |
137 CodeStubInterfaceDescriptor* descriptor, | 142 CodeStubInterfaceDescriptor* descriptor, |
138 int constant_stack_parameter_count) { | 143 int constant_stack_parameter_count) { |
139 // register state | 144 // register state |
| 145 // rsi -- context |
140 // rax -- number of arguments | 146 // rax -- number of arguments |
141 // rdi -- constructor function | 147 // rdi -- constructor function |
142 Address deopt_handler = Runtime::FunctionForId( | 148 Address deopt_handler = Runtime::FunctionForId( |
143 Runtime::kInternalArrayConstructor)->entry; | 149 Runtime::kInternalArrayConstructor)->entry; |
144 | 150 |
145 if (constant_stack_parameter_count == 0) { | 151 if (constant_stack_parameter_count == 0) { |
146 Register registers[] = { rdi }; | 152 Register registers[] = { rsi, rdi }; |
147 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 153 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
148 deopt_handler, | 154 deopt_handler, |
149 NULL, | 155 NULL, |
150 constant_stack_parameter_count, | 156 constant_stack_parameter_count, |
151 JS_FUNCTION_STUB_MODE); | 157 JS_FUNCTION_STUB_MODE); |
152 } else { | 158 } else { |
153 // stack param count needs (constructor pointer, and single argument) | 159 // stack param count needs (constructor pointer, and single argument) |
154 Register registers[] = { rdi, rax }; | 160 Register registers[] = { rsi, rdi, rax }; |
155 Representation representations[] = { | 161 Representation representations[] = { |
156 Representation::Tagged(), | 162 Representation::Tagged(), |
| 163 Representation::Tagged(), |
157 Representation::Integer32() }; | 164 Representation::Integer32() }; |
158 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 165 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
159 rax, | 166 rax, |
160 deopt_handler, | 167 deopt_handler, |
161 representations, | 168 representations, |
162 constant_stack_parameter_count, | 169 constant_stack_parameter_count, |
163 JS_FUNCTION_STUB_MODE, | 170 JS_FUNCTION_STUB_MODE, |
164 PASS_ARGUMENTS); | 171 PASS_ARGUMENTS); |
165 } | 172 } |
166 } | 173 } |
(...skipping 30 matching lines...) Expand all Loading... |
197 | 204 |
198 | 205 |
199 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 206 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
200 CodeStubInterfaceDescriptor* descriptor) { | 207 CodeStubInterfaceDescriptor* descriptor) { |
201 InitializeInternalArrayConstructorDescriptor(descriptor, -1); | 208 InitializeInternalArrayConstructorDescriptor(descriptor, -1); |
202 } | 209 } |
203 | 210 |
204 | 211 |
205 void CompareNilICStub::InitializeInterfaceDescriptor( | 212 void CompareNilICStub::InitializeInterfaceDescriptor( |
206 CodeStubInterfaceDescriptor* descriptor) { | 213 CodeStubInterfaceDescriptor* descriptor) { |
207 Register registers[] = { rax }; | 214 Register registers[] = { rsi, rax }; |
208 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 215 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
209 FUNCTION_ADDR(CompareNilIC_Miss)); | 216 FUNCTION_ADDR(CompareNilIC_Miss)); |
210 descriptor->SetMissHandler( | 217 descriptor->SetMissHandler( |
211 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 218 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
212 } | 219 } |
213 | 220 |
214 | 221 |
215 void ToBooleanStub::InitializeInterfaceDescriptor( | 222 void ToBooleanStub::InitializeInterfaceDescriptor( |
216 CodeStubInterfaceDescriptor* descriptor) { | 223 CodeStubInterfaceDescriptor* descriptor) { |
217 Register registers[] = { rax }; | 224 Register registers[] = { rsi, rax }; |
218 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 225 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
219 FUNCTION_ADDR(ToBooleanIC_Miss)); | 226 FUNCTION_ADDR(ToBooleanIC_Miss)); |
220 descriptor->SetMissHandler( | 227 descriptor->SetMissHandler( |
221 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); | 228 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); |
222 } | 229 } |
223 | 230 |
224 | 231 |
225 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( | 232 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( |
226 CodeStubInterfaceDescriptor* descriptor) { | 233 CodeStubInterfaceDescriptor* descriptor) { |
227 Register registers[] = { rax, rbx, rcx, rdx }; | 234 Register registers[] = { rsi, rax, rbx, rcx, rdx }; |
228 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 235 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
229 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); | 236 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); |
230 } | 237 } |
231 | 238 |
232 | 239 |
233 void BinaryOpICStub::InitializeInterfaceDescriptor( | 240 void BinaryOpICStub::InitializeInterfaceDescriptor( |
234 CodeStubInterfaceDescriptor* descriptor) { | 241 CodeStubInterfaceDescriptor* descriptor) { |
235 Register registers[] = { rdx, rax }; | 242 Register registers[] = { rsi, rdx, rax }; |
236 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 243 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
237 FUNCTION_ADDR(BinaryOpIC_Miss)); | 244 FUNCTION_ADDR(BinaryOpIC_Miss)); |
238 descriptor->SetMissHandler( | 245 descriptor->SetMissHandler( |
239 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); | 246 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); |
240 } | 247 } |
241 | 248 |
242 | 249 |
243 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( | 250 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( |
244 CodeStubInterfaceDescriptor* descriptor) { | 251 CodeStubInterfaceDescriptor* descriptor) { |
245 Register registers[] = { rcx, rdx, rax }; | 252 Register registers[] = { rsi, rcx, rdx, rax }; |
246 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 253 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
247 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); | 254 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); |
248 } | 255 } |
249 | 256 |
250 | 257 |
251 void StringAddStub::InitializeInterfaceDescriptor( | 258 void StringAddStub::InitializeInterfaceDescriptor( |
252 CodeStubInterfaceDescriptor* descriptor) { | 259 CodeStubInterfaceDescriptor* descriptor) { |
253 Register registers[] = { rdx, rax }; | 260 Register registers[] = { rsi, rdx, rax }; |
254 descriptor->Initialize( | 261 descriptor->Initialize( |
255 ARRAY_SIZE(registers), registers, | 262 ARRAY_SIZE(registers), registers, |
256 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | 263 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
257 } | 264 } |
258 | 265 |
259 | 266 |
260 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 267 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
261 { | 268 { |
262 CallInterfaceDescriptor* descriptor = | 269 CallInterfaceDescriptor* descriptor = |
263 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); | 270 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
264 Register registers[] = { rdi, // JSFunction | 271 Register registers[] = { rsi, // context |
265 rsi, // context | 272 rdi, // JSFunction |
266 rax, // actual number of arguments | 273 rax, // actual number of arguments |
267 rbx, // expected number of arguments | 274 rbx, // expected number of arguments |
268 }; | 275 }; |
269 Representation representations[] = { | 276 Representation representations[] = { |
| 277 Representation::Tagged(), // context |
270 Representation::Tagged(), // JSFunction | 278 Representation::Tagged(), // JSFunction |
271 Representation::Tagged(), // context | |
272 Representation::Integer32(), // actual number of arguments | 279 Representation::Integer32(), // actual number of arguments |
273 Representation::Integer32(), // expected number of arguments | 280 Representation::Integer32(), // expected number of arguments |
274 }; | 281 }; |
275 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 282 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); |
276 } | 283 } |
277 { | 284 { |
278 CallInterfaceDescriptor* descriptor = | 285 CallInterfaceDescriptor* descriptor = |
279 isolate->call_descriptor(Isolate::KeyedCall); | 286 isolate->call_descriptor(Isolate::KeyedCall); |
280 Register registers[] = { rsi, // context | 287 Register registers[] = { rsi, // context |
281 rcx, // key | 288 rcx, // key |
(...skipping 24 matching lines...) Expand all Loading... |
306 }; | 313 }; |
307 Representation representations[] = { | 314 Representation representations[] = { |
308 Representation::Tagged(), // context | 315 Representation::Tagged(), // context |
309 Representation::Tagged(), // receiver | 316 Representation::Tagged(), // receiver |
310 }; | 317 }; |
311 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 318 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); |
312 } | 319 } |
313 { | 320 { |
314 CallInterfaceDescriptor* descriptor = | 321 CallInterfaceDescriptor* descriptor = |
315 isolate->call_descriptor(Isolate::ApiFunctionCall); | 322 isolate->call_descriptor(Isolate::ApiFunctionCall); |
316 Register registers[] = { rax, // callee | 323 Register registers[] = { rsi, // context |
| 324 rax, // callee |
317 rbx, // call_data | 325 rbx, // call_data |
318 rcx, // holder | 326 rcx, // holder |
319 rdx, // api_function_address | 327 rdx, // api_function_address |
320 rsi, // context | |
321 }; | 328 }; |
322 Representation representations[] = { | 329 Representation representations[] = { |
| 330 Representation::Tagged(), // context |
323 Representation::Tagged(), // callee | 331 Representation::Tagged(), // callee |
324 Representation::Tagged(), // call_data | 332 Representation::Tagged(), // call_data |
325 Representation::Tagged(), // holder | 333 Representation::Tagged(), // holder |
326 Representation::External(), // api_function_address | 334 Representation::External(), // api_function_address |
327 Representation::Tagged(), // context | |
328 }; | 335 }; |
329 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 336 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); |
330 } | 337 } |
331 } | 338 } |
332 | 339 |
333 | 340 |
334 #define __ ACCESS_MASM(masm) | 341 #define __ ACCESS_MASM(masm) |
335 | 342 |
336 | 343 |
337 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 344 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
338 // Update the static counter each time a new code stub is generated. | 345 // Update the static counter each time a new code stub is generated. |
339 isolate()->counters()->code_stubs()->Increment(); | 346 isolate()->counters()->code_stubs()->Increment(); |
340 | 347 |
341 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); | 348 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); |
342 int param_count = descriptor->register_param_count(); | 349 int param_count = descriptor->GetEnvironmentParameterCount(); |
343 { | 350 { |
344 // Call the runtime system in a fresh internal frame. | 351 // Call the runtime system in a fresh internal frame. |
345 FrameScope scope(masm, StackFrame::INTERNAL); | 352 FrameScope scope(masm, StackFrame::INTERNAL); |
346 ASSERT(descriptor->register_param_count() == 0 || | 353 ASSERT(param_count == 0 || |
347 rax.is(descriptor->GetParameterRegister(param_count - 1))); | 354 rax.is(descriptor->GetEnvironmentParameterRegister( |
| 355 param_count - 1))); |
348 // Push arguments | 356 // Push arguments |
349 for (int i = 0; i < param_count; ++i) { | 357 for (int i = 0; i < param_count; ++i) { |
350 __ Push(descriptor->GetParameterRegister(i)); | 358 __ Push(descriptor->GetEnvironmentParameterRegister(i)); |
351 } | 359 } |
352 ExternalReference miss = descriptor->miss_handler(); | 360 ExternalReference miss = descriptor->miss_handler(); |
353 __ CallExternalReference(miss, descriptor->register_param_count()); | 361 __ CallExternalReference(miss, param_count); |
354 } | 362 } |
355 | 363 |
356 __ Ret(); | 364 __ Ret(); |
357 } | 365 } |
358 | 366 |
359 | 367 |
360 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { | 368 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
361 __ PushCallerSaved(save_doubles_); | 369 __ PushCallerSaved(save_doubles_); |
362 const int argument_count = 1; | 370 const int argument_count = 1; |
363 __ PrepareCallCFunction(argument_count); | 371 __ PrepareCallCFunction(argument_count); |
(...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4922 return_value_operand, | 4930 return_value_operand, |
4923 NULL); | 4931 NULL); |
4924 } | 4932 } |
4925 | 4933 |
4926 | 4934 |
4927 #undef __ | 4935 #undef __ |
4928 | 4936 |
4929 } } // namespace v8::internal | 4937 } } // namespace v8::internal |
4930 | 4938 |
4931 #endif // V8_TARGET_ARCH_X64 | 4939 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |