blob: 573d89e25b3a8c6fd90559ed189846ade5adb979 [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001// 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
3// found in the LICENSE file.
4
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00005#include "src/arm64/interface-descriptors-arm64.h"
Ben Murdochb8a8cc12014-11-26 15:28:44 +00006
7#if V8_TARGET_ARCH_ARM64
8
9#include "src/interface-descriptors.h"
10
11namespace v8 {
12namespace internal {
13
14const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
15
Ben Murdoch61f157c2016-09-16 13:49:30 +010016void CallInterfaceDescriptor::DefaultInitializePlatformSpecific(
17 CallInterfaceDescriptorData* data, int register_parameter_count) {
18 const Register default_stub_registers[] = {x0, x1, x2, x3, x4};
19 CHECK_LE(static_cast<size_t>(register_parameter_count),
20 arraysize(default_stub_registers));
21 data->InitializePlatformSpecific(register_parameter_count,
22 default_stub_registers);
23}
Ben Murdochb8a8cc12014-11-26 15:28:44 +000024
25const Register LoadDescriptor::ReceiverRegister() { return x1; }
26const Register LoadDescriptor::NameRegister() { return x2; }
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000027const Register LoadDescriptor::SlotRegister() { return x0; }
Ben Murdochb8a8cc12014-11-26 15:28:44 +000028
29
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000030const Register LoadWithVectorDescriptor::VectorRegister() { return x3; }
Ben Murdochb8a8cc12014-11-26 15:28:44 +000031
32
33const Register StoreDescriptor::ReceiverRegister() { return x1; }
34const Register StoreDescriptor::NameRegister() { return x2; }
35const Register StoreDescriptor::ValueRegister() { return x0; }
36
37
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000038const Register VectorStoreICTrampolineDescriptor::SlotRegister() { return x4; }
39
40
41const Register VectorStoreICDescriptor::VectorRegister() { return x3; }
42
43
44const Register VectorStoreTransitionDescriptor::SlotRegister() { return x4; }
45const Register VectorStoreTransitionDescriptor::VectorRegister() { return x3; }
46const Register VectorStoreTransitionDescriptor::MapRegister() { return x5; }
47
48
Emily Bernierd0a1eb72015-03-24 16:35:39 -040049const Register StoreTransitionDescriptor::MapRegister() { return x3; }
50
51
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000052const Register StoreGlobalViaContextDescriptor::SlotRegister() { return x2; }
53const Register StoreGlobalViaContextDescriptor::ValueRegister() { return x0; }
Ben Murdochb8a8cc12014-11-26 15:28:44 +000054
55
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000056const Register StringCompareDescriptor::LeftRegister() { return x1; }
57const Register StringCompareDescriptor::RightRegister() { return x0; }
Ben Murdochb8a8cc12014-11-26 15:28:44 +000058
Ben Murdochc5610432016-08-08 18:44:38 +010059const Register ApiGetterDescriptor::HolderRegister() { return x0; }
60const Register ApiGetterDescriptor::CallbackRegister() { return x3; }
Ben Murdochb8a8cc12014-11-26 15:28:44 +000061
62const Register MathPowTaggedDescriptor::exponent() { return x11; }
63
64
65const Register MathPowIntegerDescriptor::exponent() { return x12; }
66
67
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000068const Register GrowArrayElementsDescriptor::ObjectRegister() { return x0; }
69const Register GrowArrayElementsDescriptor::KeyRegister() { return x3; }
70
71
72void FastNewClosureDescriptor::InitializePlatformSpecific(
73 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +000074 // x2: function info
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000075 Register registers[] = {x2};
76 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +000077}
78
79
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000080void FastNewContextDescriptor::InitializePlatformSpecific(
81 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +000082 // x1: function
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000083 Register registers[] = {x1};
84 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +000085}
86
Ben Murdoch097c5b22016-05-18 11:27:45 +010087void FastNewObjectDescriptor::InitializePlatformSpecific(
88 CallInterfaceDescriptorData* data) {
89 Register registers[] = {x1, x3};
90 data->InitializePlatformSpecific(arraysize(registers), registers);
91}
92
93void FastNewRestParameterDescriptor::InitializePlatformSpecific(
94 CallInterfaceDescriptorData* data) {
95 // x1: function
96 Register registers[] = {x1};
97 data->InitializePlatformSpecific(arraysize(registers), registers);
98}
99
100
101void FastNewSloppyArgumentsDescriptor::InitializePlatformSpecific(
102 CallInterfaceDescriptorData* data) {
103 // x1: function
104 Register registers[] = {x1};
105 data->InitializePlatformSpecific(arraysize(registers), registers);
106}
107
108
109void FastNewStrictArgumentsDescriptor::InitializePlatformSpecific(
110 CallInterfaceDescriptorData* data) {
111 // x1: function
112 Register registers[] = {x1};
113 data->InitializePlatformSpecific(arraysize(registers), registers);
114}
115
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000116
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000117// static
Ben Murdochda12d292016-06-02 14:46:10 +0100118const Register TypeConversionDescriptor::ArgumentRegister() { return x0; }
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000119
120void TypeofDescriptor::InitializePlatformSpecific(
121 CallInterfaceDescriptorData* data) {
122 Register registers[] = {x3};
123 data->InitializePlatformSpecific(arraysize(registers), registers);
124}
125
126
127void FastCloneRegExpDescriptor::InitializePlatformSpecific(
128 CallInterfaceDescriptorData* data) {
129 // x3: closure
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000130 // x2: object literal index
131 // x1: constant properties
132 // x0: object literal flags
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000133 Register registers[] = {x3, x2, x1, x0};
134 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000135}
136
137
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000138void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000139 CallInterfaceDescriptorData* data) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000140 // x3: closure
141 // x2: array literal index
142 // x1: constant elements
143 Register registers[] = {x3, x2, x1};
144 data->InitializePlatformSpecific(arraysize(registers), registers);
145}
146
147
148void FastCloneShallowObjectDescriptor::InitializePlatformSpecific(
149 CallInterfaceDescriptorData* data) {
150 // x3: closure
151 // x2: object literal index
152 // x1: constant properties
153 // x0: object literal flags
154 Register registers[] = {x3, x2, x1, x0};
155 data->InitializePlatformSpecific(arraysize(registers), registers);
156}
157
158
159void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
160 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000161 // x2: feedback vector
162 // x3: call feedback slot
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000163 Register registers[] = {x2, x3};
164 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000165}
166
167
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000168void CreateWeakCellDescriptor::InitializePlatformSpecific(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000169 CallInterfaceDescriptorData* data) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000170 // x2: feedback vector
171 // x3: call feedback slot
172 // x1: tagged value to put in the weak cell
173 Register registers[] = {x2, x3, x1};
174 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000175}
176
177
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000178void CallFunctionDescriptor::InitializePlatformSpecific(
179 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000180 // x1 function the function to call
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000181 Register registers[] = {x1};
182 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000183}
184
185
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000186void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000187 CallInterfaceDescriptorData* data) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000188 Register registers[] = {x1, x3};
189 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000190}
191
192
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000193void CallFunctionWithFeedbackAndVectorDescriptor::InitializePlatformSpecific(
194 CallInterfaceDescriptorData* data) {
195 Register registers[] = {x1, x3, x2};
196 data->InitializePlatformSpecific(arraysize(registers), registers);
197}
198
199
200void CallConstructDescriptor::InitializePlatformSpecific(
201 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000202 // x0 : number of arguments
203 // x1 : the function to call
204 // x2 : feedback vector
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000205 // x3 : slot in feedback vector (Smi, for RecordCallTarget)
206 // x4 : new target (for IsSuperConstructorCall)
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000207 // TODO(turbofan): So far we don't gather type feedback and hence skip the
208 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000209 Register registers[] = {x0, x1, x4, x2};
210 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000211}
212
213
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000214void CallTrampolineDescriptor::InitializePlatformSpecific(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000215 CallInterfaceDescriptorData* data) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000216 // x1: target
217 // x0: number of arguments
218 Register registers[] = {x1, x0};
219 data->InitializePlatformSpecific(arraysize(registers), registers);
220}
221
222
223void ConstructStubDescriptor::InitializePlatformSpecific(
224 CallInterfaceDescriptorData* data) {
225 // x3: new target
226 // x1: target
227 // x0: number of arguments
228 // x2: allocation site or undefined
229 Register registers[] = {x1, x3, x0, x2};
230 data->InitializePlatformSpecific(arraysize(registers), registers);
231}
232
233
234void ConstructTrampolineDescriptor::InitializePlatformSpecific(
235 CallInterfaceDescriptorData* data) {
236 // x3: new target
237 // x1: target
238 // x0: number of arguments
239 Register registers[] = {x1, x3, x0};
240 data->InitializePlatformSpecific(arraysize(registers), registers);
241}
242
243
244void RegExpConstructResultDescriptor::InitializePlatformSpecific(
245 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000246 // x2: length
247 // x1: index (of last match)
248 // x0: string
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000249 Register registers[] = {x2, x1, x0};
250 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000251}
252
253
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000254void TransitionElementsKindDescriptor::InitializePlatformSpecific(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000255 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000256 // x0: value (js_array)
257 // x1: to_map
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000258 Register registers[] = {x0, x1};
259 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000260}
261
262
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000263void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400264 CallInterfaceDescriptorData* data) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000265 data->InitializePlatformSpecific(0, nullptr, nullptr);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400266}
267
Ben Murdochda12d292016-06-02 14:46:10 +0100268#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
269 void Allocate##Type##Descriptor::InitializePlatformSpecific( \
270 CallInterfaceDescriptorData* data) { \
271 data->InitializePlatformSpecific(0, nullptr, nullptr); \
272 }
273SIMD128_TYPES(SIMD128_ALLOC_DESC)
274#undef SIMD128_ALLOC_DESC
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400275
Ben Murdochc5610432016-08-08 18:44:38 +0100276void ArrayNoArgumentConstructorDescriptor::InitializePlatformSpecific(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000277 CallInterfaceDescriptorData* data) {
Ben Murdochc5610432016-08-08 18:44:38 +0100278 // register state
279 // x1: function
280 // x2: allocation site with elements kind
281 // x0: number of arguments to the constructor function
282 Register registers[] = {x1, x2, x0};
283 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000284}
285
Ben Murdoch61f157c2016-09-16 13:49:30 +0100286void ArraySingleArgumentConstructorDescriptor::InitializePlatformSpecific(
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000287 CallInterfaceDescriptorData* data) {
Ben Murdoch61f157c2016-09-16 13:49:30 +0100288 // register state
289 // x0: number of arguments
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000290 // x1: function
291 // x2: allocation site with elements kind
Ben Murdoch61f157c2016-09-16 13:49:30 +0100292 Register registers[] = {x1, x2, x0};
293 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000294}
295
Ben Murdoch61f157c2016-09-16 13:49:30 +0100296void ArrayNArgumentsConstructorDescriptor::InitializePlatformSpecific(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000297 CallInterfaceDescriptorData* data) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000298 // stack param count needs (constructor pointer, and single argument)
299 Register registers[] = {x1, x2, x0};
300 data->InitializePlatformSpecific(arraysize(registers), registers);
301}
302
Ben Murdoch61f157c2016-09-16 13:49:30 +0100303void VarArgFunctionDescriptor::InitializePlatformSpecific(
Ben Murdochda12d292016-06-02 14:46:10 +0100304 CallInterfaceDescriptorData* data) {
305 // stack param count needs (arg count)
306 Register registers[] = {x0};
307 data->InitializePlatformSpecific(arraysize(registers), registers);
308}
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000309
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000310void CompareDescriptor::InitializePlatformSpecific(
311 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000312 // x1: left operand
313 // x0: right operand
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000314 Register registers[] = {x1, x0};
315 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000316}
317
318
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000319void BinaryOpDescriptor::InitializePlatformSpecific(
320 CallInterfaceDescriptorData* data) {
321 // x1: left operand
322 // x0: right operand
323 Register registers[] = {x1, x0};
324 data->InitializePlatformSpecific(arraysize(registers), registers);
325}
326
327
328void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
329 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000330 // x2: allocation site
331 // x1: left operand
332 // x0: right operand
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000333 Register registers[] = {x2, x1, x0};
334 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000335}
336
Ben Murdochc5610432016-08-08 18:44:38 +0100337void CountOpDescriptor::InitializePlatformSpecific(
338 CallInterfaceDescriptorData* data) {
339 Register registers[] = {x1};
340 data->InitializePlatformSpecific(arraysize(registers), registers);
341}
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000342
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000343void StringAddDescriptor::InitializePlatformSpecific(
344 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000345 // x1: left operand
346 // x0: right operand
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000347 Register registers[] = {x1, x0};
348 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000349}
350
351
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000352void KeyedDescriptor::InitializePlatformSpecific(
353 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000354 static PlatformInterfaceDescriptor noInlineDescriptor =
355 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
356
357 Register registers[] = {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000358 x2, // key
359 };
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000360 data->InitializePlatformSpecific(arraysize(registers), registers,
361 &noInlineDescriptor);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000362}
363
364
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000365void NamedDescriptor::InitializePlatformSpecific(
366 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000367 static PlatformInterfaceDescriptor noInlineDescriptor =
368 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
369
370 Register registers[] = {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000371 x2, // name
372 };
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000373 data->InitializePlatformSpecific(arraysize(registers), registers,
374 &noInlineDescriptor);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000375}
376
377
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000378void CallHandlerDescriptor::InitializePlatformSpecific(
379 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000380 static PlatformInterfaceDescriptor default_descriptor =
381 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
382
383 Register registers[] = {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000384 x0, // receiver
385 };
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000386 data->InitializePlatformSpecific(arraysize(registers), registers,
387 &default_descriptor);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000388}
389
390
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000391void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
392 CallInterfaceDescriptorData* data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000393 static PlatformInterfaceDescriptor default_descriptor =
394 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
395
396 Register registers[] = {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000397 x1, // JSFunction
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000398 x3, // the new target
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000399 x0, // actual number of arguments
400 x2, // expected number of arguments
401 };
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000402 data->InitializePlatformSpecific(arraysize(registers), registers,
403 &default_descriptor);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000404}
405
Ben Murdochda12d292016-06-02 14:46:10 +0100406void ApiCallbackDescriptorBase::InitializePlatformSpecific(
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000407 CallInterfaceDescriptorData* data) {
408 static PlatformInterfaceDescriptor default_descriptor =
409 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
410
411 Register registers[] = {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000412 x0, // callee
413 x4, // call_data
414 x2, // holder
415 x1, // api_function_address
416 };
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000417 data->InitializePlatformSpecific(arraysize(registers), registers,
418 &default_descriptor);
419}
420
Ben Murdoch097c5b22016-05-18 11:27:45 +0100421void InterpreterDispatchDescriptor::InitializePlatformSpecific(
422 CallInterfaceDescriptorData* data) {
423 Register registers[] = {
Ben Murdochc5610432016-08-08 18:44:38 +0100424 kInterpreterAccumulatorRegister, kInterpreterBytecodeOffsetRegister,
425 kInterpreterBytecodeArrayRegister, kInterpreterDispatchTableRegister};
Ben Murdoch097c5b22016-05-18 11:27:45 +0100426 data->InitializePlatformSpecific(arraysize(registers), registers);
427}
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000428
429void InterpreterPushArgsAndCallDescriptor::InitializePlatformSpecific(
430 CallInterfaceDescriptorData* data) {
431 Register registers[] = {
432 x0, // argument count (not including receiver)
433 x2, // address of first argument
434 x1 // the target callable to be call
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000435 };
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000436 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000437}
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000438
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000439void InterpreterPushArgsAndConstructDescriptor::InitializePlatformSpecific(
440 CallInterfaceDescriptorData* data) {
441 Register registers[] = {
442 x0, // argument count (not including receiver)
443 x3, // new target
444 x1, // constructor to call
445 x2 // address of the first argument
446 };
447 data->InitializePlatformSpecific(arraysize(registers), registers);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000448}
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000449
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000450void InterpreterCEntryDescriptor::InitializePlatformSpecific(
451 CallInterfaceDescriptorData* data) {
452 Register registers[] = {
453 x0, // argument count (argc)
454 x11, // address of first argument (argv)
455 x1 // the runtime function to call
456 };
457 data->InitializePlatformSpecific(arraysize(registers), registers);
458}
459
Ben Murdochc5610432016-08-08 18:44:38 +0100460void ResumeGeneratorDescriptor::InitializePlatformSpecific(
461 CallInterfaceDescriptorData* data) {
462 Register registers[] = {
463 x0, // the value to pass to the generator
464 x1, // the JSGeneratorObject to resume
465 x2 // the resume mode (tagged)
466 };
467 data->InitializePlatformSpecific(arraysize(registers), registers);
468}
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000469
470} // namespace internal
471} // namespace v8
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000472
473#endif // V8_TARGET_ARCH_ARM64