OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 3357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3368 LoadInstanceDescriptors(dst, dst); | 3368 LoadInstanceDescriptors(dst, dst); |
3369 LoadP(dst, | 3369 LoadP(dst, |
3370 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); | 3370 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); |
3371 const int getterOffset = AccessorPair::kGetterOffset; | 3371 const int getterOffset = AccessorPair::kGetterOffset; |
3372 const int setterOffset = AccessorPair::kSetterOffset; | 3372 const int setterOffset = AccessorPair::kSetterOffset; |
3373 int offset = ((accessor == ACCESSOR_GETTER) ? getterOffset : setterOffset); | 3373 int offset = ((accessor == ACCESSOR_GETTER) ? getterOffset : setterOffset); |
3374 LoadP(dst, FieldMemOperand(dst, offset)); | 3374 LoadP(dst, FieldMemOperand(dst, offset)); |
3375 } | 3375 } |
3376 | 3376 |
3377 | 3377 |
3378 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { | 3378 void MacroAssembler::CheckEnumCache(Label* call_runtime) { |
| 3379 Register null_value = r8; |
3379 Register empty_fixed_array_value = r9; | 3380 Register empty_fixed_array_value = r9; |
3380 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); | 3381 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
3381 Label next, start; | 3382 Label next, start; |
3382 mr(r5, r3); | 3383 mr(r5, r3); |
3383 | 3384 |
3384 // Check if the enum length field is properly initialized, indicating that | 3385 // Check if the enum length field is properly initialized, indicating that |
3385 // there is an enum cache. | 3386 // there is an enum cache. |
3386 LoadP(r4, FieldMemOperand(r5, HeapObject::kMapOffset)); | 3387 LoadP(r4, FieldMemOperand(r5, HeapObject::kMapOffset)); |
3387 | 3388 |
3388 EnumLength(r6, r4); | 3389 EnumLength(r6, r4); |
3389 CmpSmiLiteral(r6, Smi::FromInt(kInvalidEnumCacheSentinel), r0); | 3390 CmpSmiLiteral(r6, Smi::FromInt(kInvalidEnumCacheSentinel), r0); |
3390 beq(call_runtime); | 3391 beq(call_runtime); |
3391 | 3392 |
| 3393 LoadRoot(null_value, Heap::kNullValueRootIndex); |
3392 b(&start); | 3394 b(&start); |
3393 | 3395 |
3394 bind(&next); | 3396 bind(&next); |
3395 LoadP(r4, FieldMemOperand(r5, HeapObject::kMapOffset)); | 3397 LoadP(r4, FieldMemOperand(r5, HeapObject::kMapOffset)); |
3396 | 3398 |
3397 // For all objects but the receiver, check that the cache is empty. | 3399 // For all objects but the receiver, check that the cache is empty. |
3398 EnumLength(r6, r4); | 3400 EnumLength(r6, r4); |
3399 CmpSmiLiteral(r6, Smi::FromInt(0), r0); | 3401 CmpSmiLiteral(r6, Smi::FromInt(0), r0); |
3400 bne(call_runtime); | 3402 bne(call_runtime); |
3401 | 3403 |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4314 } | 4316 } |
4315 if (mag.shift > 0) srawi(result, result, mag.shift); | 4317 if (mag.shift > 0) srawi(result, result, mag.shift); |
4316 ExtractBit(r0, dividend, 31); | 4318 ExtractBit(r0, dividend, 31); |
4317 add(result, result, r0); | 4319 add(result, result, r0); |
4318 } | 4320 } |
4319 | 4321 |
4320 } // namespace internal | 4322 } // namespace internal |
4321 } // namespace v8 | 4323 } // namespace v8 |
4322 | 4324 |
4323 #endif // V8_TARGET_ARCH_PPC | 4325 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |