| 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/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1455 __ Pop(R4); // Restore arguments descriptor array. | 1455 __ Pop(R4); // Restore arguments descriptor array. |
| 1456 __ LeaveStubFrame(); | 1456 __ LeaveStubFrame(); |
| 1457 Label call_target_function; | 1457 Label call_target_function; |
| 1458 __ b(&call_target_function); | 1458 __ b(&call_target_function); |
| 1459 | 1459 |
| 1460 __ Bind(&found); | 1460 __ Bind(&found); |
| 1461 // R6: pointer to an IC data check group. | 1461 // R6: pointer to an IC data check group. |
| 1462 const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize; | 1462 const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize; |
| 1463 const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize; | 1463 const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize; |
| 1464 __ LoadFromOffset(R0, R6, target_offset, kNoPP); | 1464 __ LoadFromOffset(R0, R6, target_offset, kNoPP); |
| 1465 |
| 1466 // Update counter. |
| 1465 __ LoadFromOffset(R1, R6, count_offset, kNoPP); | 1467 __ LoadFromOffset(R1, R6, count_offset, kNoPP); |
| 1466 __ adds(R1, R1, Operand(Smi::RawValue(1))); | 1468 __ adds(R1, R1, Operand(Smi::RawValue(1))); |
| 1467 __ StoreToOffset(R1, R6, count_offset, kNoPP); | 1469 __ LoadImmediate(R2, Smi::RawValue(Smi::kMaxValue), kNoPP); |
| 1468 __ b(&call_target_function, VC); // No overflow. | 1470 __ csel(R1, R2, R1, VS); // Overflow. |
| 1469 __ LoadImmediate(R1, Smi::RawValue(Smi::kMaxValue), kNoPP); | |
| 1470 __ StoreToOffset(R1, R6, count_offset, kNoPP); | 1471 __ StoreToOffset(R1, R6, count_offset, kNoPP); |
| 1471 | 1472 |
| 1472 __ Bind(&call_target_function); | 1473 __ Bind(&call_target_function); |
| 1473 // R0: target function. | 1474 // R0: target function. |
| 1474 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), kNoPP); | 1475 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), kNoPP); |
| 1475 __ AddImmediate( | 1476 __ AddImmediate( |
| 1476 R2, R2, Instructions::HeaderSize() - kHeapObjectTag, kNoPP); | 1477 R2, R2, Instructions::HeaderSize() - kHeapObjectTag, kNoPP); |
| 1477 __ br(R2); | 1478 __ br(R2); |
| 1478 } | 1479 } |
| 1479 | 1480 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1931 const Register right = R0; | 1932 const Register right = R0; |
| 1932 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); | 1933 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); |
| 1933 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); | 1934 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); |
| 1934 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 1935 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 1935 __ ret(); | 1936 __ ret(); |
| 1936 } | 1937 } |
| 1937 | 1938 |
| 1938 } // namespace dart | 1939 } // namespace dart |
| 1939 | 1940 |
| 1940 #endif // defined TARGET_ARCH_ARM64 | 1941 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |