OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
10 | 10 |
(...skipping 3732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3743 | 3743 |
3744 | 3744 |
3745 void MacroAssembler::EnumLength(Register dst, Register map) { | 3745 void MacroAssembler::EnumLength(Register dst, Register map) { |
3746 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); | 3746 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); |
3747 ldr(dst, FieldMemOperand(map, Map::kBitField3Offset)); | 3747 ldr(dst, FieldMemOperand(map, Map::kBitField3Offset)); |
3748 and_(dst, dst, Operand(Map::EnumLengthBits::kMask)); | 3748 and_(dst, dst, Operand(Map::EnumLengthBits::kMask)); |
3749 SmiTag(dst); | 3749 SmiTag(dst); |
3750 } | 3750 } |
3751 | 3751 |
3752 | 3752 |
| 3753 void MacroAssembler::LoadAccessor(Register dst, Register holder, |
| 3754 int accessor_index, |
| 3755 AccessorComponent accessor) { |
| 3756 ldr(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); |
| 3757 LoadInstanceDescriptors(dst, dst); |
| 3758 ldr(dst, |
| 3759 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); |
| 3760 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset |
| 3761 : AccessorPair::kSetterOffset; |
| 3762 ldr(dst, FieldMemOperand(dst, offset)); |
| 3763 } |
| 3764 |
| 3765 |
3753 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { | 3766 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { |
3754 Register empty_fixed_array_value = r6; | 3767 Register empty_fixed_array_value = r6; |
3755 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); | 3768 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
3756 Label next, start; | 3769 Label next, start; |
3757 mov(r2, r0); | 3770 mov(r2, r0); |
3758 | 3771 |
3759 // Check if the enum length field is properly initialized, indicating that | 3772 // Check if the enum length field is properly initialized, indicating that |
3760 // there is an enum cache. | 3773 // there is an enum cache. |
3761 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); | 3774 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); |
3762 | 3775 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3957 } | 3970 } |
3958 } | 3971 } |
3959 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3972 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3960 add(result, result, Operand(dividend, LSR, 31)); | 3973 add(result, result, Operand(dividend, LSR, 31)); |
3961 } | 3974 } |
3962 | 3975 |
3963 } // namespace internal | 3976 } // namespace internal |
3964 } // namespace v8 | 3977 } // namespace v8 |
3965 | 3978 |
3966 #endif // V8_TARGET_ARCH_ARM | 3979 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |