| 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 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 void FastNewClosureStub::InitializeInterfaceDescriptor( | 17 void FastNewClosureStub::InitializeInterfaceDescriptor( |
| 18 CodeStubInterfaceDescriptor* descriptor) { | 18 CodeStubInterfaceDescriptor* descriptor) { |
| 19 // cp: context | 19 // cp: context |
| 20 // x2: function info | 20 // x2: function info |
| 21 Register registers[] = { cp, x2 }; | 21 Register registers[] = { cp, x2 }; |
| 22 descriptor->Initialize( | 22 descriptor->Initialize( |
| 23 ARRAY_SIZE(registers), registers, | 23 MajorKey(), 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 // cp: context | 30 // cp: context |
| 31 // x1: function | 31 // x1: function |
| 32 Register registers[] = { cp, x1 }; | 32 Register registers[] = { cp, x1 }; |
| 33 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 33 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 34 } | 34 } |
| 35 | 35 |
| 36 | 36 |
| 37 void ToNumberStub::InitializeInterfaceDescriptor( | 37 void ToNumberStub::InitializeInterfaceDescriptor( |
| 38 CodeStubInterfaceDescriptor* descriptor) { | 38 CodeStubInterfaceDescriptor* descriptor) { |
| 39 // cp: context | 39 // cp: context |
| 40 // x0: value | 40 // x0: value |
| 41 Register registers[] = { cp, x0 }; | 41 Register registers[] = { cp, x0 }; |
| 42 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 42 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 void NumberToStringStub::InitializeInterfaceDescriptor( | 46 void NumberToStringStub::InitializeInterfaceDescriptor( |
| 47 CodeStubInterfaceDescriptor* descriptor) { | 47 CodeStubInterfaceDescriptor* descriptor) { |
| 48 // cp: context | 48 // cp: context |
| 49 // x0: value | 49 // x0: value |
| 50 Register registers[] = { cp, x0 }; | 50 Register registers[] = { cp, x0 }; |
| 51 descriptor->Initialize( | 51 descriptor->Initialize( |
| 52 ARRAY_SIZE(registers), registers, | 52 MajorKey(), ARRAY_SIZE(registers), registers, |
| 53 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); | 53 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); |
| 54 } | 54 } |
| 55 | 55 |
| 56 | 56 |
| 57 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 57 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
| 58 CodeStubInterfaceDescriptor* descriptor) { | 58 CodeStubInterfaceDescriptor* descriptor) { |
| 59 // cp: context | 59 // cp: context |
| 60 // x3: array literals array | 60 // x3: array literals array |
| 61 // x2: array literal index | 61 // x2: array literal index |
| 62 // x1: constant elements | 62 // x1: constant elements |
| 63 Register registers[] = { cp, x3, x2, x1 }; | 63 Register registers[] = { cp, x3, x2, x1 }; |
| 64 Representation representations[] = { | 64 Representation representations[] = { |
| 65 Representation::Tagged(), | 65 Representation::Tagged(), |
| 66 Representation::Tagged(), | 66 Representation::Tagged(), |
| 67 Representation::Smi(), | 67 Representation::Smi(), |
| 68 Representation::Tagged() }; | 68 Representation::Tagged() }; |
| 69 descriptor->Initialize( | 69 descriptor->Initialize( |
| 70 ARRAY_SIZE(registers), registers, | 70 MajorKey(), ARRAY_SIZE(registers), registers, |
| 71 Runtime::FunctionForId( | 71 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, |
| 72 Runtime::kCreateArrayLiteralStubBailout)->entry, | |
| 73 representations); | 72 representations); |
| 74 } | 73 } |
| 75 | 74 |
| 76 | 75 |
| 77 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 76 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
| 78 CodeStubInterfaceDescriptor* descriptor) { | 77 CodeStubInterfaceDescriptor* descriptor) { |
| 79 // cp: context | 78 // cp: context |
| 80 // x3: object literals array | 79 // x3: object literals array |
| 81 // x2: object literal index | 80 // x2: object literal index |
| 82 // x1: constant properties | 81 // x1: constant properties |
| 83 // x0: object literal flags | 82 // x0: object literal flags |
| 84 Register registers[] = { cp, x3, x2, x1, x0 }; | 83 Register registers[] = { cp, x3, x2, x1, x0 }; |
| 85 descriptor->Initialize( | 84 descriptor->Initialize( |
| 86 ARRAY_SIZE(registers), registers, | 85 MajorKey(), ARRAY_SIZE(registers), registers, |
| 87 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); | 86 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); |
| 88 } | 87 } |
| 89 | 88 |
| 90 | 89 |
| 91 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 90 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
| 92 CodeStubInterfaceDescriptor* descriptor) { | 91 CodeStubInterfaceDescriptor* descriptor) { |
| 93 // cp: context | 92 // cp: context |
| 94 // x2: feedback vector | 93 // x2: feedback vector |
| 95 // x3: call feedback slot | 94 // x3: call feedback slot |
| 96 Register registers[] = { cp, x2, x3 }; | 95 Register registers[] = { cp, x2, x3 }; |
| 97 descriptor->Initialize(ARRAY_SIZE(registers), registers); | 96 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 98 } | 97 } |
| 99 | 98 |
| 100 | 99 |
| 100 void InstanceofStub::InitializeInterfaceDescriptor( |
| 101 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { |
| 102 Register registers[] = {cp, left(), right()}; |
| 103 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 104 } |
| 105 |
| 106 |
| 107 void CallFunctionStub::InitializeInterfaceDescriptor( |
| 108 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { |
| 109 // x1 function the function to call |
| 110 Register registers[] = {cp, x1}; |
| 111 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 112 } |
| 113 |
| 114 |
| 115 void CallConstructStub::InitializeInterfaceDescriptor( |
| 116 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { |
| 117 // x0 : number of arguments |
| 118 // x1 : the function to call |
| 119 // x2 : feedback vector |
| 120 // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol) |
| 121 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
| 122 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
| 123 Register registers[] = {cp, x0, x1, x2}; |
| 124 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 125 } |
| 126 |
| 127 |
| 101 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 128 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
| 102 CodeStubInterfaceDescriptor* descriptor) { | 129 CodeStubInterfaceDescriptor* descriptor) { |
| 103 // cp: context | 130 // cp: context |
| 104 // x2: length | 131 // x2: length |
| 105 // x1: index (of last match) | 132 // x1: index (of last match) |
| 106 // x0: string | 133 // x0: string |
| 107 Register registers[] = { cp, x2, x1, x0 }; | 134 Register registers[] = { cp, x2, x1, x0 }; |
| 108 descriptor->Initialize( | 135 descriptor->Initialize( |
| 109 ARRAY_SIZE(registers), registers, | 136 MajorKey(), ARRAY_SIZE(registers), registers, |
| 110 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 137 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 111 } | 138 } |
| 112 | 139 |
| 113 | 140 |
| 114 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 141 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| 115 CodeStubInterfaceDescriptor* descriptor) { | 142 CodeStubInterfaceDescriptor* descriptor) { |
| 116 // cp: context | 143 // cp: context |
| 117 // x0: value (js_array) | 144 // x0: value (js_array) |
| 118 // x1: to_map | 145 // x1: to_map |
| 119 Register registers[] = { cp, x0, x1 }; | 146 Register registers[] = { cp, x0, x1 }; |
| 120 Address entry = | 147 Address entry = |
| 121 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; | 148 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; |
| 122 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 149 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 123 FUNCTION_ADDR(entry)); | 150 FUNCTION_ADDR(entry)); |
| 124 } | 151 } |
| 125 | 152 |
| 126 | 153 |
| 127 void CompareNilICStub::InitializeInterfaceDescriptor( | 154 void CompareNilICStub::InitializeInterfaceDescriptor( |
| 128 CodeStubInterfaceDescriptor* descriptor) { | 155 CodeStubInterfaceDescriptor* descriptor) { |
| 129 // cp: context | 156 // cp: context |
| 130 // x0: value to compare | 157 // x0: value to compare |
| 131 Register registers[] = { cp, x0 }; | 158 Register registers[] = { cp, x0 }; |
| 132 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 159 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 133 FUNCTION_ADDR(CompareNilIC_Miss)); | 160 FUNCTION_ADDR(CompareNilIC_Miss)); |
| 134 descriptor->SetMissHandler( | 161 descriptor->SetMissHandler( |
| 135 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 162 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
| 136 } | 163 } |
| 137 | 164 |
| 138 | 165 |
| 139 const Register InterfaceDescriptor::ContextRegister() { return cp; } | 166 const Register InterfaceDescriptor::ContextRegister() { return cp; } |
| 140 | 167 |
| 141 | 168 |
| 142 static void InitializeArrayConstructorDescriptor( | 169 static void InitializeArrayConstructorDescriptor( |
| 143 CodeStubInterfaceDescriptor* descriptor, | 170 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 144 int constant_stack_parameter_count) { | 171 int constant_stack_parameter_count) { |
| 145 // cp: context | 172 // cp: context |
| 146 // x1: function | 173 // x1: function |
| 147 // x2: allocation site with elements kind | 174 // x2: allocation site with elements kind |
| 148 // x0: number of arguments to the constructor function | 175 // x0: number of arguments to the constructor function |
| 149 Address deopt_handler = Runtime::FunctionForId( | 176 Address deopt_handler = Runtime::FunctionForId( |
| 150 Runtime::kArrayConstructor)->entry; | 177 Runtime::kArrayConstructor)->entry; |
| 151 | 178 |
| 152 if (constant_stack_parameter_count == 0) { | 179 if (constant_stack_parameter_count == 0) { |
| 153 Register registers[] = { cp, x1, x2 }; | 180 Register registers[] = { cp, x1, x2 }; |
| 154 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 181 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, |
| 155 deopt_handler, | 182 deopt_handler, NULL, constant_stack_parameter_count, |
| 156 NULL, | |
| 157 constant_stack_parameter_count, | |
| 158 JS_FUNCTION_STUB_MODE); | 183 JS_FUNCTION_STUB_MODE); |
| 159 } else { | 184 } else { |
| 160 // stack param count needs (constructor pointer, and single argument) | 185 // stack param count needs (constructor pointer, and single argument) |
| 161 Register registers[] = { cp, x1, x2, x0 }; | 186 Register registers[] = { cp, x1, x2, x0 }; |
| 162 Representation representations[] = { | 187 Representation representations[] = { |
| 163 Representation::Tagged(), | 188 Representation::Tagged(), |
| 164 Representation::Tagged(), | 189 Representation::Tagged(), |
| 165 Representation::Tagged(), | 190 Representation::Tagged(), |
| 166 Representation::Integer32() }; | 191 Representation::Integer32() }; |
| 167 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 192 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, x0, |
| 168 x0, | 193 deopt_handler, representations, |
| 169 deopt_handler, | |
| 170 representations, | |
| 171 constant_stack_parameter_count, | 194 constant_stack_parameter_count, |
| 172 JS_FUNCTION_STUB_MODE, | 195 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 173 PASS_ARGUMENTS); | |
| 174 } | 196 } |
| 175 } | 197 } |
| 176 | 198 |
| 177 | 199 |
| 178 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 200 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 179 CodeStubInterfaceDescriptor* descriptor) { | 201 CodeStubInterfaceDescriptor* descriptor) { |
| 180 InitializeArrayConstructorDescriptor(descriptor, 0); | 202 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| 181 } | 203 } |
| 182 | 204 |
| 183 | 205 |
| 184 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( | 206 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 185 CodeStubInterfaceDescriptor* descriptor) { | 207 CodeStubInterfaceDescriptor* descriptor) { |
| 186 InitializeArrayConstructorDescriptor(descriptor, 1); | 208 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 1); |
| 187 } | 209 } |
| 188 | 210 |
| 189 | 211 |
| 190 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 212 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 191 CodeStubInterfaceDescriptor* descriptor) { | 213 CodeStubInterfaceDescriptor* descriptor) { |
| 192 InitializeArrayConstructorDescriptor(descriptor, -1); | 214 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 193 } | 215 } |
| 194 | 216 |
| 195 | 217 |
| 196 static void InitializeInternalArrayConstructorDescriptor( | 218 static void InitializeInternalArrayConstructorDescriptor( |
| 197 CodeStubInterfaceDescriptor* descriptor, | 219 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 198 int constant_stack_parameter_count) { | 220 int constant_stack_parameter_count) { |
| 199 // cp: context | 221 // cp: context |
| 200 // x1: constructor function | 222 // x1: constructor function |
| 201 // x0: number of arguments to the constructor function | 223 // x0: number of arguments to the constructor function |
| 202 Address deopt_handler = Runtime::FunctionForId( | 224 Address deopt_handler = Runtime::FunctionForId( |
| 203 Runtime::kInternalArrayConstructor)->entry; | 225 Runtime::kInternalArrayConstructor)->entry; |
| 204 | 226 |
| 205 if (constant_stack_parameter_count == 0) { | 227 if (constant_stack_parameter_count == 0) { |
| 206 Register registers[] = { cp, x1 }; | 228 Register registers[] = { cp, x1 }; |
| 207 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 229 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, |
| 208 deopt_handler, | 230 deopt_handler, NULL, constant_stack_parameter_count, |
| 209 NULL, | |
| 210 constant_stack_parameter_count, | |
| 211 JS_FUNCTION_STUB_MODE); | 231 JS_FUNCTION_STUB_MODE); |
| 212 } else { | 232 } else { |
| 213 // stack param count needs (constructor pointer, and single argument) | 233 // stack param count needs (constructor pointer, and single argument) |
| 214 Register registers[] = { cp, x1, x0 }; | 234 Register registers[] = { cp, x1, x0 }; |
| 215 Representation representations[] = { | 235 Representation representations[] = { |
| 216 Representation::Tagged(), | 236 Representation::Tagged(), |
| 217 Representation::Tagged(), | 237 Representation::Tagged(), |
| 218 Representation::Integer32() }; | 238 Representation::Integer32() }; |
| 219 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 239 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, x0, |
| 220 x0, | 240 deopt_handler, representations, |
| 221 deopt_handler, | |
| 222 representations, | |
| 223 constant_stack_parameter_count, | 241 constant_stack_parameter_count, |
| 224 JS_FUNCTION_STUB_MODE, | 242 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 225 PASS_ARGUMENTS); | |
| 226 } | 243 } |
| 227 } | 244 } |
| 228 | 245 |
| 229 | 246 |
| 230 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 247 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 231 CodeStubInterfaceDescriptor* descriptor) { | 248 CodeStubInterfaceDescriptor* descriptor) { |
| 232 InitializeInternalArrayConstructorDescriptor(descriptor, 0); | 249 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| 233 } | 250 } |
| 234 | 251 |
| 235 | 252 |
| 236 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( | 253 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 237 CodeStubInterfaceDescriptor* descriptor) { | 254 CodeStubInterfaceDescriptor* descriptor) { |
| 238 InitializeInternalArrayConstructorDescriptor(descriptor, 1); | 255 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 1); |
| 239 } | 256 } |
| 240 | 257 |
| 241 | 258 |
| 242 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 259 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 243 CodeStubInterfaceDescriptor* descriptor) { | 260 CodeStubInterfaceDescriptor* descriptor) { |
| 244 InitializeInternalArrayConstructorDescriptor(descriptor, -1); | 261 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 245 } | 262 } |
| 246 | 263 |
| 247 | 264 |
| 248 void ToBooleanStub::InitializeInterfaceDescriptor( | 265 void ToBooleanStub::InitializeInterfaceDescriptor( |
| 249 CodeStubInterfaceDescriptor* descriptor) { | 266 CodeStubInterfaceDescriptor* descriptor) { |
| 250 // cp: context | 267 // cp: context |
| 251 // x0: value | 268 // x0: value |
| 252 Register registers[] = { cp, x0 }; | 269 Register registers[] = { cp, x0 }; |
| 253 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 270 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 254 FUNCTION_ADDR(ToBooleanIC_Miss)); | 271 FUNCTION_ADDR(ToBooleanIC_Miss)); |
| 255 descriptor->SetMissHandler( | 272 descriptor->SetMissHandler( |
| 256 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); | 273 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); |
| 257 } | 274 } |
| 258 | 275 |
| 259 | 276 |
| 260 void BinaryOpICStub::InitializeInterfaceDescriptor( | 277 void BinaryOpICStub::InitializeInterfaceDescriptor( |
| 261 CodeStubInterfaceDescriptor* descriptor) { | 278 CodeStubInterfaceDescriptor* descriptor) { |
| 262 // cp: context | 279 // cp: context |
| 263 // x1: left operand | 280 // x1: left operand |
| 264 // x0: right operand | 281 // x0: right operand |
| 265 Register registers[] = { cp, x1, x0 }; | 282 Register registers[] = { cp, x1, x0 }; |
| 266 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 283 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 267 FUNCTION_ADDR(BinaryOpIC_Miss)); | 284 FUNCTION_ADDR(BinaryOpIC_Miss)); |
| 268 descriptor->SetMissHandler( | 285 descriptor->SetMissHandler( |
| 269 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); | 286 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); |
| 270 } | 287 } |
| 271 | 288 |
| 272 | 289 |
| 273 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( | 290 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( |
| 274 CodeStubInterfaceDescriptor* descriptor) { | 291 CodeStubInterfaceDescriptor* descriptor) { |
| 275 // cp: context | 292 // cp: context |
| 276 // x2: allocation site | 293 // x2: allocation site |
| 277 // x1: left operand | 294 // x1: left operand |
| 278 // x0: right operand | 295 // x0: right operand |
| 279 Register registers[] = { cp, x2, x1, x0 }; | 296 Register registers[] = { cp, x2, x1, x0 }; |
| 280 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 297 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 281 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); | 298 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); |
| 282 } | 299 } |
| 283 | 300 |
| 284 | 301 |
| 285 void StringAddStub::InitializeInterfaceDescriptor( | 302 void StringAddStub::InitializeInterfaceDescriptor( |
| 286 CodeStubInterfaceDescriptor* descriptor) { | 303 CodeStubInterfaceDescriptor* descriptor) { |
| 287 // cp: context | 304 // cp: context |
| 288 // x1: left operand | 305 // x1: left operand |
| 289 // x0: right operand | 306 // x0: right operand |
| 290 Register registers[] = { cp, x1, x0 }; | 307 Register registers[] = { cp, x1, x0 }; |
| 291 descriptor->Initialize( | 308 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 292 ARRAY_SIZE(registers), registers, | 309 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
| 293 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | |
| 294 } | 310 } |
| 295 | 311 |
| 296 | 312 |
| 297 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 313 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 298 static PlatformInterfaceDescriptor default_descriptor = | 314 static PlatformInterfaceDescriptor default_descriptor = |
| 299 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); | 315 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); |
| 300 | 316 |
| 301 static PlatformInterfaceDescriptor noInlineDescriptor = | 317 static PlatformInterfaceDescriptor noInlineDescriptor = |
| 302 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); | 318 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); |
| 303 | 319 |
| (...skipping 5096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5400 MemOperand(fp, 6 * kPointerSize), | 5416 MemOperand(fp, 6 * kPointerSize), |
| 5401 NULL); | 5417 NULL); |
| 5402 } | 5418 } |
| 5403 | 5419 |
| 5404 | 5420 |
| 5405 #undef __ | 5421 #undef __ |
| 5406 | 5422 |
| 5407 } } // namespace v8::internal | 5423 } } // namespace v8::internal |
| 5408 | 5424 |
| 5409 #endif // V8_TARGET_ARCH_ARM64 | 5425 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |