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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 Ldr(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); | 1481 Ldr(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); |
1482 LoadInstanceDescriptors(dst, dst); | 1482 LoadInstanceDescriptors(dst, dst); |
1483 Ldr(dst, | 1483 Ldr(dst, |
1484 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); | 1484 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); |
1485 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset | 1485 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset |
1486 : AccessorPair::kSetterOffset; | 1486 : AccessorPair::kSetterOffset; |
1487 Ldr(dst, FieldMemOperand(dst, offset)); | 1487 Ldr(dst, FieldMemOperand(dst, offset)); |
1488 } | 1488 } |
1489 | 1489 |
1490 | 1490 |
1491 void MacroAssembler::CheckEnumCache(Register object, | 1491 void MacroAssembler::CheckEnumCache(Register object, Register scratch0, |
1492 Register null_value, | 1492 Register scratch1, Register scratch2, |
1493 Register scratch0, | 1493 Register scratch3, Register scratch4, |
1494 Register scratch1, | |
1495 Register scratch2, | |
1496 Register scratch3, | |
1497 Label* call_runtime) { | 1494 Label* call_runtime) { |
1498 DCHECK(!AreAliased(object, null_value, scratch0, scratch1, scratch2, | 1495 DCHECK(!AreAliased(object, scratch0, scratch1, scratch2, scratch3, scratch4)); |
1499 scratch3)); | |
1500 | 1496 |
1501 Register empty_fixed_array_value = scratch0; | 1497 Register empty_fixed_array_value = scratch0; |
1502 Register current_object = scratch1; | 1498 Register current_object = scratch1; |
| 1499 Register null_value = scratch4; |
1503 | 1500 |
1504 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); | 1501 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
1505 Label next, start; | 1502 Label next, start; |
1506 | 1503 |
1507 Mov(current_object, object); | 1504 Mov(current_object, object); |
1508 | 1505 |
1509 // Check if the enum length field is properly initialized, indicating that | 1506 // Check if the enum length field is properly initialized, indicating that |
1510 // there is an enum cache. | 1507 // there is an enum cache. |
1511 Register map = scratch2; | 1508 Register map = scratch2; |
1512 Register enum_length = scratch3; | 1509 Register enum_length = scratch3; |
1513 Ldr(map, FieldMemOperand(current_object, HeapObject::kMapOffset)); | 1510 Ldr(map, FieldMemOperand(current_object, HeapObject::kMapOffset)); |
1514 | 1511 |
1515 EnumLengthUntagged(enum_length, map); | 1512 EnumLengthUntagged(enum_length, map); |
1516 Cmp(enum_length, kInvalidEnumCacheSentinel); | 1513 Cmp(enum_length, kInvalidEnumCacheSentinel); |
1517 B(eq, call_runtime); | 1514 B(eq, call_runtime); |
1518 | 1515 |
| 1516 LoadRoot(null_value, Heap::kNullValueRootIndex); |
1519 B(&start); | 1517 B(&start); |
1520 | 1518 |
1521 Bind(&next); | 1519 Bind(&next); |
1522 Ldr(map, FieldMemOperand(current_object, HeapObject::kMapOffset)); | 1520 Ldr(map, FieldMemOperand(current_object, HeapObject::kMapOffset)); |
1523 | 1521 |
1524 // For all objects but the receiver, check that the cache is empty. | 1522 // For all objects but the receiver, check that the cache is empty. |
1525 EnumLengthUntagged(enum_length, map); | 1523 EnumLengthUntagged(enum_length, map); |
1526 Cbnz(enum_length, call_runtime); | 1524 Cbnz(enum_length, call_runtime); |
1527 | 1525 |
1528 Bind(&start); | 1526 Bind(&start); |
(...skipping 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4887 } | 4885 } |
4888 | 4886 |
4889 | 4887 |
4890 #undef __ | 4888 #undef __ |
4891 | 4889 |
4892 | 4890 |
4893 } // namespace internal | 4891 } // namespace internal |
4894 } // namespace v8 | 4892 } // namespace v8 |
4895 | 4893 |
4896 #endif // V8_TARGET_ARCH_ARM64 | 4894 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |