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 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3377 ldr(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); | 3377 ldr(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); |
3378 LoadInstanceDescriptors(dst, dst); | 3378 LoadInstanceDescriptors(dst, dst); |
3379 ldr(dst, | 3379 ldr(dst, |
3380 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); | 3380 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); |
3381 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset | 3381 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset |
3382 : AccessorPair::kSetterOffset; | 3382 : AccessorPair::kSetterOffset; |
3383 ldr(dst, FieldMemOperand(dst, offset)); | 3383 ldr(dst, FieldMemOperand(dst, offset)); |
3384 } | 3384 } |
3385 | 3385 |
3386 | 3386 |
3387 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { | 3387 void MacroAssembler::CheckEnumCache(Label* call_runtime) { |
| 3388 Register null_value = r5; |
3388 Register empty_fixed_array_value = r6; | 3389 Register empty_fixed_array_value = r6; |
3389 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); | 3390 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
3390 Label next, start; | 3391 Label next, start; |
3391 mov(r2, r0); | 3392 mov(r2, r0); |
3392 | 3393 |
3393 // Check if the enum length field is properly initialized, indicating that | 3394 // Check if the enum length field is properly initialized, indicating that |
3394 // there is an enum cache. | 3395 // there is an enum cache. |
3395 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); | 3396 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); |
3396 | 3397 |
3397 EnumLength(r3, r1); | 3398 EnumLength(r3, r1); |
3398 cmp(r3, Operand(Smi::FromInt(kInvalidEnumCacheSentinel))); | 3399 cmp(r3, Operand(Smi::FromInt(kInvalidEnumCacheSentinel))); |
3399 b(eq, call_runtime); | 3400 b(eq, call_runtime); |
3400 | 3401 |
| 3402 LoadRoot(null_value, Heap::kNullValueRootIndex); |
3401 jmp(&start); | 3403 jmp(&start); |
3402 | 3404 |
3403 bind(&next); | 3405 bind(&next); |
3404 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); | 3406 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); |
3405 | 3407 |
3406 // For all objects but the receiver, check that the cache is empty. | 3408 // For all objects but the receiver, check that the cache is empty. |
3407 EnumLength(r3, r1); | 3409 EnumLength(r3, r1); |
3408 cmp(r3, Operand(Smi::FromInt(0))); | 3410 cmp(r3, Operand(Smi::FromInt(0))); |
3409 b(ne, call_runtime); | 3411 b(ne, call_runtime); |
3410 | 3412 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3605 } | 3607 } |
3606 } | 3608 } |
3607 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3609 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3608 add(result, result, Operand(dividend, LSR, 31)); | 3610 add(result, result, Operand(dividend, LSR, 31)); |
3609 } | 3611 } |
3610 | 3612 |
3611 } // namespace internal | 3613 } // namespace internal |
3612 } // namespace v8 | 3614 } // namespace v8 |
3613 | 3615 |
3614 #endif // V8_TARGET_ARCH_ARM | 3616 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |