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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 6221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6232 ld(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); | 6232 ld(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); |
6233 LoadInstanceDescriptors(dst, dst); | 6233 LoadInstanceDescriptors(dst, dst); |
6234 ld(dst, | 6234 ld(dst, |
6235 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); | 6235 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); |
6236 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset | 6236 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset |
6237 : AccessorPair::kSetterOffset; | 6237 : AccessorPair::kSetterOffset; |
6238 ld(dst, FieldMemOperand(dst, offset)); | 6238 ld(dst, FieldMemOperand(dst, offset)); |
6239 } | 6239 } |
6240 | 6240 |
6241 | 6241 |
6242 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { | 6242 void MacroAssembler::CheckEnumCache(Label* call_runtime) { |
| 6243 Register null_value = a5; |
6243 Register empty_fixed_array_value = a6; | 6244 Register empty_fixed_array_value = a6; |
6244 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); | 6245 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
6245 Label next, start; | 6246 Label next, start; |
6246 mov(a2, a0); | 6247 mov(a2, a0); |
6247 | 6248 |
6248 // Check if the enum length field is properly initialized, indicating that | 6249 // Check if the enum length field is properly initialized, indicating that |
6249 // there is an enum cache. | 6250 // there is an enum cache. |
6250 ld(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); | 6251 ld(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); |
6251 | 6252 |
6252 EnumLength(a3, a1); | 6253 EnumLength(a3, a1); |
6253 Branch( | 6254 Branch( |
6254 call_runtime, eq, a3, Operand(Smi::FromInt(kInvalidEnumCacheSentinel))); | 6255 call_runtime, eq, a3, Operand(Smi::FromInt(kInvalidEnumCacheSentinel))); |
6255 | 6256 |
| 6257 LoadRoot(null_value, Heap::kNullValueRootIndex); |
6256 jmp(&start); | 6258 jmp(&start); |
6257 | 6259 |
6258 bind(&next); | 6260 bind(&next); |
6259 ld(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); | 6261 ld(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); |
6260 | 6262 |
6261 // For all objects but the receiver, check that the cache is empty. | 6263 // For all objects but the receiver, check that the cache is empty. |
6262 EnumLength(a3, a1); | 6264 EnumLength(a3, a1); |
6263 Branch(call_runtime, ne, a3, Operand(Smi::FromInt(0))); | 6265 Branch(call_runtime, ne, a3, Operand(Smi::FromInt(0))); |
6264 | 6266 |
6265 bind(&start); | 6267 bind(&start); |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6493 if (mag.shift > 0) sra(result, result, mag.shift); | 6495 if (mag.shift > 0) sra(result, result, mag.shift); |
6494 srl(at, dividend, 31); | 6496 srl(at, dividend, 31); |
6495 Addu(result, result, Operand(at)); | 6497 Addu(result, result, Operand(at)); |
6496 } | 6498 } |
6497 | 6499 |
6498 | 6500 |
6499 } // namespace internal | 6501 } // namespace internal |
6500 } // namespace v8 | 6502 } // namespace v8 |
6501 | 6503 |
6502 #endif // V8_TARGET_ARCH_MIPS64 | 6504 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |