| 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/interface-descriptors.h" | 9 #include "src/interface-descriptors.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 const Register CallInterfaceDescriptor::ContextRegister() { return cp; } | 14 const Register CallInterfaceDescriptor::ContextRegister() { return cp; } |
| 15 | 15 |
| 16 | 16 |
| 17 const Register LoadDescriptor::ReceiverRegister() { return x1; } | 17 const Register LoadDescriptor::ReceiverRegister() { return x1; } |
| 18 const Register LoadDescriptor::NameRegister() { return x2; } | 18 const Register LoadDescriptor::NameRegister() { return x2; } |
| 19 | 19 |
| 20 | 20 |
| 21 const Register VectorLoadICDescriptor::ReceiverRegister() { | 21 const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return x0; } |
| 22 return LoadDescriptor::ReceiverRegister(); | |
| 23 } | |
| 24 | 22 |
| 25 | 23 |
| 26 const Register VectorLoadICDescriptor::NameRegister() { | |
| 27 return LoadDescriptor::NameRegister(); | |
| 28 } | |
| 29 | |
| 30 | |
| 31 const Register VectorLoadICDescriptor::SlotRegister() { return x0; } | |
| 32 const Register VectorLoadICDescriptor::VectorRegister() { return x3; } | 24 const Register VectorLoadICDescriptor::VectorRegister() { return x3; } |
| 33 | 25 |
| 34 | 26 |
| 35 const Register StoreDescriptor::ReceiverRegister() { return x1; } | 27 const Register StoreDescriptor::ReceiverRegister() { return x1; } |
| 36 const Register StoreDescriptor::NameRegister() { return x2; } | 28 const Register StoreDescriptor::NameRegister() { return x2; } |
| 37 const Register StoreDescriptor::ValueRegister() { return x0; } | 29 const Register StoreDescriptor::ValueRegister() { return x0; } |
| 38 | 30 |
| 39 | 31 |
| 40 const Register ElementTransitionAndStoreDescriptor::ReceiverRegister() { | |
| 41 return StoreDescriptor::ReceiverRegister(); | |
| 42 } | |
| 43 | |
| 44 | |
| 45 const Register ElementTransitionAndStoreDescriptor::NameRegister() { | |
| 46 return StoreDescriptor::NameRegister(); | |
| 47 } | |
| 48 | |
| 49 | |
| 50 const Register ElementTransitionAndStoreDescriptor::ValueRegister() { | |
| 51 return StoreDescriptor::ValueRegister(); | |
| 52 } | |
| 53 | |
| 54 | |
| 55 const Register ElementTransitionAndStoreDescriptor::MapRegister() { return x3; } | 32 const Register ElementTransitionAndStoreDescriptor::MapRegister() { return x3; } |
| 56 | 33 |
| 57 | 34 |
| 58 const Register InstanceofDescriptor::left() { | 35 const Register InstanceofDescriptor::left() { |
| 59 // Object to check (instanceof lhs). | 36 // Object to check (instanceof lhs). |
| 60 return x11; | 37 return x11; |
| 61 } | 38 } |
| 62 | 39 |
| 63 | 40 |
| 64 const Register InstanceofDescriptor::right() { | 41 const Register InstanceofDescriptor::right() { |
| 65 // Constructor function (instanceof rhs). | 42 // Constructor function (instanceof rhs). |
| 66 return x10; | 43 return x10; |
| 67 } | 44 } |
| 68 | 45 |
| 69 | 46 |
| 47 const Register ArgumentsAccessReadDescriptor::index() { return x1; } |
| 48 const Register ArgumentsAccessReadDescriptor::parameter_count() { return x0; } |
| 49 |
| 50 |
| 51 const Register ApiGetterDescriptor::function_address() { return x2; } |
| 52 |
| 53 |
| 54 const Register MathPowTaggedDescriptor::exponent() { return x11; } |
| 55 |
| 56 |
| 57 const Register MathPowIntegerDescriptor::exponent() { return x12; } |
| 58 |
| 59 |
| 70 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 60 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
| 71 // cp: context | 61 // cp: context |
| 72 // x2: function info | 62 // x2: function info |
| 73 Register registers[] = {cp, x2}; | 63 Register registers[] = {cp, x2}; |
| 74 data->Initialize(arraysize(registers), registers, NULL); | 64 data->Initialize(arraysize(registers), registers, NULL); |
| 75 } | 65 } |
| 76 | 66 |
| 77 | 67 |
| 78 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 68 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
| 79 // cp: context | 69 // cp: context |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 void CreateAllocationSiteDescriptor::Initialize( | 118 void CreateAllocationSiteDescriptor::Initialize( |
| 129 CallInterfaceDescriptorData* data) { | 119 CallInterfaceDescriptorData* data) { |
| 130 // cp: context | 120 // cp: context |
| 131 // x2: feedback vector | 121 // x2: feedback vector |
| 132 // x3: call feedback slot | 122 // x3: call feedback slot |
| 133 Register registers[] = {cp, x2, x3}; | 123 Register registers[] = {cp, x2, x3}; |
| 134 data->Initialize(arraysize(registers), registers, NULL); | 124 data->Initialize(arraysize(registers), registers, NULL); |
| 135 } | 125 } |
| 136 | 126 |
| 137 | 127 |
| 128 void StoreArrayLiteralElementDescriptor::Initialize( |
| 129 CallInterfaceDescriptorData* data) { |
| 130 Register registers[] = {cp, x3, x0}; |
| 131 data->Initialize(arraysize(registers), registers, NULL); |
| 132 } |
| 133 |
| 134 |
| 138 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 135 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
| 139 // x1 function the function to call | 136 // x1 function the function to call |
| 140 Register registers[] = {cp, x1}; | 137 Register registers[] = {cp, x1}; |
| 141 data->Initialize(arraysize(registers), registers, NULL); | 138 data->Initialize(arraysize(registers), registers, NULL); |
| 142 } | 139 } |
| 143 | 140 |
| 144 | 141 |
| 142 void CallFunctionWithFeedbackDescriptor::Initialize( |
| 143 CallInterfaceDescriptorData* data) { |
| 144 Register registers[] = {cp, x1, x3}; |
| 145 Representation representations[] = {Representation::Tagged(), |
| 146 Representation::Tagged(), |
| 147 Representation::Smi()}; |
| 148 data->Initialize(arraysize(registers), registers, representations); |
| 149 } |
| 150 |
| 151 |
| 145 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 152 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
| 146 // x0 : number of arguments | 153 // x0 : number of arguments |
| 147 // x1 : the function to call | 154 // x1 : the function to call |
| 148 // x2 : feedback vector | 155 // x2 : feedback vector |
| 149 // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol) | 156 // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol) |
| 150 // TODO(turbofan): So far we don't gather type feedback and hence skip the | 157 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
| 151 // slot parameter, but ArrayConstructStub needs the vector to be undefined. | 158 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
| 152 Register registers[] = {cp, x0, x1, x2}; | 159 Register registers[] = {cp, x0, x1, x2}; |
| 153 data->Initialize(arraysize(registers), registers, NULL); | 160 data->Initialize(arraysize(registers), registers, NULL); |
| 154 } | 161 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 Representation::Tagged(), // holder | 359 Representation::Tagged(), // holder |
| 353 Representation::External(), // api_function_address | 360 Representation::External(), // api_function_address |
| 354 }; | 361 }; |
| 355 data->Initialize(arraysize(registers), registers, representations, | 362 data->Initialize(arraysize(registers), registers, representations, |
| 356 &default_descriptor); | 363 &default_descriptor); |
| 357 } | 364 } |
| 358 } | 365 } |
| 359 } // namespace v8::internal | 366 } // namespace v8::internal |
| 360 | 367 |
| 361 #endif // V8_TARGET_ARCH_ARM64 | 368 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |