| 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, |
| 102 CodeStubInterfaceDescriptor* descriptor) { |
| 103 Register registers[] = { cp, left(), right() }; |
| 104 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 105 } |
| 106 |
| 107 |
| 108 void CallFunctionStub::InitializeInterfaceDescriptor( |
| 109 Isolate* isolate, |
| 110 CodeStubInterfaceDescriptor* descriptor) { |
| 111 // x1 function the function to call |
| 112 Register registers[] = { cp, x1 }; |
| 113 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 114 } |
| 115 |
| 116 |
| 117 void CallConstructStub::InitializeInterfaceDescriptor( |
| 118 Isolate* isolate, |
| 119 CodeStubInterfaceDescriptor* descriptor) { |
| 120 // x0 : number of arguments |
| 121 // x1 : the function to call |
| 122 // x2 : feedback vector |
| 123 // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol) |
| 124 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
| 125 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
| 126 Register registers[] = { cp, x0, x1, x2 }; |
| 127 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); |
| 128 } |
| 129 |
| 130 |
| 101 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 131 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
| 102 CodeStubInterfaceDescriptor* descriptor) { | 132 CodeStubInterfaceDescriptor* descriptor) { |
| 103 // cp: context | 133 // cp: context |
| 104 // x2: length | 134 // x2: length |
| 105 // x1: index (of last match) | 135 // x1: index (of last match) |
| 106 // x0: string | 136 // x0: string |
| 107 Register registers[] = { cp, x2, x1, x0 }; | 137 Register registers[] = { cp, x2, x1, x0 }; |
| 108 descriptor->Initialize( | 138 descriptor->Initialize( |
| 109 ARRAY_SIZE(registers), registers, | 139 MajorKey(), ARRAY_SIZE(registers), registers, |
| 110 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 140 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 111 } | 141 } |
| 112 | 142 |
| 113 | 143 |
| 114 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 144 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| 115 CodeStubInterfaceDescriptor* descriptor) { | 145 CodeStubInterfaceDescriptor* descriptor) { |
| 116 // cp: context | 146 // cp: context |
| 117 // x0: value (js_array) | 147 // x0: value (js_array) |
| 118 // x1: to_map | 148 // x1: to_map |
| 119 Register registers[] = { cp, x0, x1 }; | 149 Register registers[] = { cp, x0, x1 }; |
| 120 Address entry = | 150 Address entry = |
| 121 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; | 151 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; |
| 122 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 152 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 123 FUNCTION_ADDR(entry)); | 153 FUNCTION_ADDR(entry)); |
| 124 } | 154 } |
| 125 | 155 |
| 126 | 156 |
| 127 void CompareNilICStub::InitializeInterfaceDescriptor( | 157 void CompareNilICStub::InitializeInterfaceDescriptor( |
| 128 CodeStubInterfaceDescriptor* descriptor) { | 158 CodeStubInterfaceDescriptor* descriptor) { |
| 129 // cp: context | 159 // cp: context |
| 130 // x0: value to compare | 160 // x0: value to compare |
| 131 Register registers[] = { cp, x0 }; | 161 Register registers[] = { cp, x0 }; |
| 132 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 162 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 133 FUNCTION_ADDR(CompareNilIC_Miss)); | 163 FUNCTION_ADDR(CompareNilIC_Miss)); |
| 134 descriptor->SetMissHandler( | 164 descriptor->SetMissHandler( |
| 135 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 165 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
| 136 } | 166 } |
| 137 | 167 |
| 138 | 168 |
| 139 const Register InterfaceDescriptor::ContextRegister() { return cp; } | 169 const Register InterfaceDescriptor::ContextRegister() { return cp; } |
| 140 | 170 |
| 141 | 171 |
| 142 static void InitializeArrayConstructorDescriptor( | 172 static void InitializeArrayConstructorDescriptor( |
| 143 CodeStubInterfaceDescriptor* descriptor, | 173 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 144 int constant_stack_parameter_count) { | 174 int constant_stack_parameter_count) { |
| 145 // cp: context | 175 // cp: context |
| 146 // x1: function | 176 // x1: function |
| 147 // x2: allocation site with elements kind | 177 // x2: allocation site with elements kind |
| 148 // x0: number of arguments to the constructor function | 178 // x0: number of arguments to the constructor function |
| 149 Address deopt_handler = Runtime::FunctionForId( | 179 Address deopt_handler = Runtime::FunctionForId( |
| 150 Runtime::kArrayConstructor)->entry; | 180 Runtime::kArrayConstructor)->entry; |
| 151 | 181 |
| 152 if (constant_stack_parameter_count == 0) { | 182 if (constant_stack_parameter_count == 0) { |
| 153 Register registers[] = { cp, x1, x2 }; | 183 Register registers[] = { cp, x1, x2 }; |
| 154 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 184 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, |
| 155 deopt_handler, | 185 deopt_handler, NULL, constant_stack_parameter_count, |
| 156 NULL, | |
| 157 constant_stack_parameter_count, | |
| 158 JS_FUNCTION_STUB_MODE); | 186 JS_FUNCTION_STUB_MODE); |
| 159 } else { | 187 } else { |
| 160 // stack param count needs (constructor pointer, and single argument) | 188 // stack param count needs (constructor pointer, and single argument) |
| 161 Register registers[] = { cp, x1, x2, x0 }; | 189 Register registers[] = { cp, x1, x2, x0 }; |
| 162 Representation representations[] = { | 190 Representation representations[] = { |
| 163 Representation::Tagged(), | 191 Representation::Tagged(), |
| 164 Representation::Tagged(), | 192 Representation::Tagged(), |
| 165 Representation::Tagged(), | 193 Representation::Tagged(), |
| 166 Representation::Integer32() }; | 194 Representation::Integer32() }; |
| 167 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 195 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, x0, |
| 168 x0, | 196 deopt_handler, representations, |
| 169 deopt_handler, | |
| 170 representations, | |
| 171 constant_stack_parameter_count, | 197 constant_stack_parameter_count, |
| 172 JS_FUNCTION_STUB_MODE, | 198 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 173 PASS_ARGUMENTS); | |
| 174 } | 199 } |
| 175 } | 200 } |
| 176 | 201 |
| 177 | 202 |
| 178 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 203 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 179 CodeStubInterfaceDescriptor* descriptor) { | 204 CodeStubInterfaceDescriptor* descriptor) { |
| 180 InitializeArrayConstructorDescriptor(descriptor, 0); | 205 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| 181 } | 206 } |
| 182 | 207 |
| 183 | 208 |
| 184 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( | 209 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 185 CodeStubInterfaceDescriptor* descriptor) { | 210 CodeStubInterfaceDescriptor* descriptor) { |
| 186 InitializeArrayConstructorDescriptor(descriptor, 1); | 211 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 1); |
| 187 } | 212 } |
| 188 | 213 |
| 189 | 214 |
| 190 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 215 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 191 CodeStubInterfaceDescriptor* descriptor) { | 216 CodeStubInterfaceDescriptor* descriptor) { |
| 192 InitializeArrayConstructorDescriptor(descriptor, -1); | 217 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 193 } | 218 } |
| 194 | 219 |
| 195 | 220 |
| 196 static void InitializeInternalArrayConstructorDescriptor( | 221 static void InitializeInternalArrayConstructorDescriptor( |
| 197 CodeStubInterfaceDescriptor* descriptor, | 222 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 198 int constant_stack_parameter_count) { | 223 int constant_stack_parameter_count) { |
| 199 // cp: context | 224 // cp: context |
| 200 // x1: constructor function | 225 // x1: constructor function |
| 201 // x0: number of arguments to the constructor function | 226 // x0: number of arguments to the constructor function |
| 202 Address deopt_handler = Runtime::FunctionForId( | 227 Address deopt_handler = Runtime::FunctionForId( |
| 203 Runtime::kInternalArrayConstructor)->entry; | 228 Runtime::kInternalArrayConstructor)->entry; |
| 204 | 229 |
| 205 if (constant_stack_parameter_count == 0) { | 230 if (constant_stack_parameter_count == 0) { |
| 206 Register registers[] = { cp, x1 }; | 231 Register registers[] = { cp, x1 }; |
| 207 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 232 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, |
| 208 deopt_handler, | 233 deopt_handler, NULL, constant_stack_parameter_count, |
| 209 NULL, | |
| 210 constant_stack_parameter_count, | |
| 211 JS_FUNCTION_STUB_MODE); | 234 JS_FUNCTION_STUB_MODE); |
| 212 } else { | 235 } else { |
| 213 // stack param count needs (constructor pointer, and single argument) | 236 // stack param count needs (constructor pointer, and single argument) |
| 214 Register registers[] = { cp, x1, x0 }; | 237 Register registers[] = { cp, x1, x0 }; |
| 215 Representation representations[] = { | 238 Representation representations[] = { |
| 216 Representation::Tagged(), | 239 Representation::Tagged(), |
| 217 Representation::Tagged(), | 240 Representation::Tagged(), |
| 218 Representation::Integer32() }; | 241 Representation::Integer32() }; |
| 219 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 242 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, x0, |
| 220 x0, | 243 deopt_handler, representations, |
| 221 deopt_handler, | |
| 222 representations, | |
| 223 constant_stack_parameter_count, | 244 constant_stack_parameter_count, |
| 224 JS_FUNCTION_STUB_MODE, | 245 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 225 PASS_ARGUMENTS); | |
| 226 } | 246 } |
| 227 } | 247 } |
| 228 | 248 |
| 229 | 249 |
| 230 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 250 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 231 CodeStubInterfaceDescriptor* descriptor) { | 251 CodeStubInterfaceDescriptor* descriptor) { |
| 232 InitializeInternalArrayConstructorDescriptor(descriptor, 0); | 252 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| 233 } | 253 } |
| 234 | 254 |
| 235 | 255 |
| 236 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( | 256 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 237 CodeStubInterfaceDescriptor* descriptor) { | 257 CodeStubInterfaceDescriptor* descriptor) { |
| 238 InitializeInternalArrayConstructorDescriptor(descriptor, 1); | 258 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 1); |
| 239 } | 259 } |
| 240 | 260 |
| 241 | 261 |
| 242 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 262 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 243 CodeStubInterfaceDescriptor* descriptor) { | 263 CodeStubInterfaceDescriptor* descriptor) { |
| 244 InitializeInternalArrayConstructorDescriptor(descriptor, -1); | 264 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 245 } | 265 } |
| 246 | 266 |
| 247 | 267 |
| 248 void ToBooleanStub::InitializeInterfaceDescriptor( | 268 void ToBooleanStub::InitializeInterfaceDescriptor( |
| 249 CodeStubInterfaceDescriptor* descriptor) { | 269 CodeStubInterfaceDescriptor* descriptor) { |
| 250 // cp: context | 270 // cp: context |
| 251 // x0: value | 271 // x0: value |
| 252 Register registers[] = { cp, x0 }; | 272 Register registers[] = { cp, x0 }; |
| 253 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 273 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 254 FUNCTION_ADDR(ToBooleanIC_Miss)); | 274 FUNCTION_ADDR(ToBooleanIC_Miss)); |
| 255 descriptor->SetMissHandler( | 275 descriptor->SetMissHandler( |
| 256 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); | 276 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); |
| 257 } | 277 } |
| 258 | 278 |
| 259 | 279 |
| 260 void BinaryOpICStub::InitializeInterfaceDescriptor( | 280 void BinaryOpICStub::InitializeInterfaceDescriptor( |
| 261 CodeStubInterfaceDescriptor* descriptor) { | 281 CodeStubInterfaceDescriptor* descriptor) { |
| 262 // cp: context | 282 // cp: context |
| 263 // x1: left operand | 283 // x1: left operand |
| 264 // x0: right operand | 284 // x0: right operand |
| 265 Register registers[] = { cp, x1, x0 }; | 285 Register registers[] = { cp, x1, x0 }; |
| 266 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 286 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 267 FUNCTION_ADDR(BinaryOpIC_Miss)); | 287 FUNCTION_ADDR(BinaryOpIC_Miss)); |
| 268 descriptor->SetMissHandler( | 288 descriptor->SetMissHandler( |
| 269 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); | 289 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); |
| 270 } | 290 } |
| 271 | 291 |
| 272 | 292 |
| 273 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( | 293 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( |
| 274 CodeStubInterfaceDescriptor* descriptor) { | 294 CodeStubInterfaceDescriptor* descriptor) { |
| 275 // cp: context | 295 // cp: context |
| 276 // x2: allocation site | 296 // x2: allocation site |
| 277 // x1: left operand | 297 // x1: left operand |
| 278 // x0: right operand | 298 // x0: right operand |
| 279 Register registers[] = { cp, x2, x1, x0 }; | 299 Register registers[] = { cp, x2, x1, x0 }; |
| 280 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 300 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 281 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); | 301 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); |
| 282 } | 302 } |
| 283 | 303 |
| 284 | 304 |
| 285 void StringAddStub::InitializeInterfaceDescriptor( | 305 void StringAddStub::InitializeInterfaceDescriptor( |
| 286 CodeStubInterfaceDescriptor* descriptor) { | 306 CodeStubInterfaceDescriptor* descriptor) { |
| 287 // cp: context | 307 // cp: context |
| 288 // x1: left operand | 308 // x1: left operand |
| 289 // x0: right operand | 309 // x0: right operand |
| 290 Register registers[] = { cp, x1, x0 }; | 310 Register registers[] = { cp, x1, x0 }; |
| 291 descriptor->Initialize( | 311 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, |
| 292 ARRAY_SIZE(registers), registers, | 312 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
| 293 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | |
| 294 } | 313 } |
| 295 | 314 |
| 296 | 315 |
| 297 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 316 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 298 static PlatformInterfaceDescriptor default_descriptor = | 317 static PlatformInterfaceDescriptor default_descriptor = |
| 299 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); | 318 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); |
| 300 | 319 |
| 301 static PlatformInterfaceDescriptor noInlineDescriptor = | 320 static PlatformInterfaceDescriptor noInlineDescriptor = |
| 302 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); | 321 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); |
| 303 | 322 |
| (...skipping 5096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5400 MemOperand(fp, 6 * kPointerSize), | 5419 MemOperand(fp, 6 * kPointerSize), |
| 5401 NULL); | 5420 NULL); |
| 5402 } | 5421 } |
| 5403 | 5422 |
| 5404 | 5423 |
| 5405 #undef __ | 5424 #undef __ |
| 5406 | 5425 |
| 5407 } } // namespace v8::internal | 5426 } } // namespace v8::internal |
| 5408 | 5427 |
| 5409 #endif // V8_TARGET_ARCH_ARM64 | 5428 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |