| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 __ LoadFieldFromOffset(R2, R4, ArgumentsDescriptor::count_offset()); | 608 __ LoadFieldFromOffset(R2, R4, ArgumentsDescriptor::count_offset()); |
| 609 __ add(TMP, FP, Operand(R2, LSL, 2)); // R2 is Smi. | 609 __ add(TMP, FP, Operand(R2, LSL, 2)); // R2 is Smi. |
| 610 __ LoadFromOffset(R6, TMP, kParamEndSlotFromFp * kWordSize); | 610 __ LoadFromOffset(R6, TMP, kParamEndSlotFromFp * kWordSize); |
| 611 __ Push(ZR); // Result slot. | 611 __ Push(ZR); // Result slot. |
| 612 __ Push(R6); // Receiver. | 612 __ Push(R6); // Receiver. |
| 613 __ Push(R5); // ICData/MegamorphicCache. | 613 __ Push(R5); // ICData/MegamorphicCache. |
| 614 __ Push(R4); // Arguments descriptor. | 614 __ Push(R4); // Arguments descriptor. |
| 615 | 615 |
| 616 // Adjust arguments count. | 616 // Adjust arguments count. |
| 617 __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset()); | 617 __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset()); |
| 618 __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments. | 618 __ AddImmediate(TMP, R2, 1); // Include the type arguments. |
| 619 __ cmp(R3, Operand(0)); | 619 __ cmp(R3, Operand(0)); |
| 620 __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP. | 620 __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP + 1 (R2 : R2 + 2). |
| 621 | 621 |
| 622 // R2: Smi-tagged arguments array length. | 622 // R2: Smi-tagged arguments array length. |
| 623 PushArgumentsArray(assembler); | 623 PushArgumentsArray(assembler); |
| 624 const intptr_t kNumArgs = 4; | 624 const intptr_t kNumArgs = 4; |
| 625 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); | 625 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); |
| 626 __ Drop(4); | 626 __ Drop(4); |
| 627 __ Pop(R0); // Return value. | 627 __ Pop(R0); // Return value. |
| 628 __ LeaveStubFrame(); | 628 __ LeaveStubFrame(); |
| 629 __ ret(); | 629 __ ret(); |
| 630 } | 630 } |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 | 1262 |
| 1263 // Push space for the return value. | 1263 // Push space for the return value. |
| 1264 // Push the receiver. | 1264 // Push the receiver. |
| 1265 // Push arguments descriptor array. | 1265 // Push arguments descriptor array. |
| 1266 __ Push(ZR); | 1266 __ Push(ZR); |
| 1267 __ Push(R6); | 1267 __ Push(R6); |
| 1268 __ Push(R4); | 1268 __ Push(R4); |
| 1269 | 1269 |
| 1270 // Adjust arguments count. | 1270 // Adjust arguments count. |
| 1271 __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset()); | 1271 __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset()); |
| 1272 __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments. | 1272 __ AddImmediate(TMP, R2, 1); // Include the type arguments. |
| 1273 __ cmp(R3, Operand(0)); | 1273 __ cmp(R3, Operand(0)); |
| 1274 __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP. | 1274 __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP + 1 (R2 : R2 + 2). |
| 1275 | 1275 |
| 1276 // R2: Smi-tagged arguments array length. | 1276 // R2: Smi-tagged arguments array length. |
| 1277 PushArgumentsArray(assembler); | 1277 PushArgumentsArray(assembler); |
| 1278 | 1278 |
| 1279 const intptr_t kNumArgs = 3; | 1279 const intptr_t kNumArgs = 3; |
| 1280 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); | 1280 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); |
| 1281 // noSuchMethod on closures always throws an error, so it will never return. | 1281 // noSuchMethod on closures always throws an error, so it will never return. |
| 1282 __ brk(0); | 1282 __ brk(0); |
| 1283 } | 1283 } |
| 1284 | 1284 |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2316 __ brk(0); | 2316 __ brk(0); |
| 2317 } | 2317 } |
| 2318 | 2318 |
| 2319 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2319 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
| 2320 __ brk(0); | 2320 __ brk(0); |
| 2321 } | 2321 } |
| 2322 | 2322 |
| 2323 } // namespace dart | 2323 } // namespace dart |
| 2324 | 2324 |
| 2325 #endif // defined TARGET_ARCH_ARM64 | 2325 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |