| 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_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
| 10 | 10 |
| (...skipping 5866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5877 | 5877 |
| 5878 | 5878 |
| 5879 void MacroAssembler::EnumLength(Register dst, Register map) { | 5879 void MacroAssembler::EnumLength(Register dst, Register map) { |
| 5880 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); | 5880 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); |
| 5881 lw(dst, FieldMemOperand(map, Map::kBitField3Offset)); | 5881 lw(dst, FieldMemOperand(map, Map::kBitField3Offset)); |
| 5882 And(dst, dst, Operand(Map::EnumLengthBits::kMask)); | 5882 And(dst, dst, Operand(Map::EnumLengthBits::kMask)); |
| 5883 SmiTag(dst); | 5883 SmiTag(dst); |
| 5884 } | 5884 } |
| 5885 | 5885 |
| 5886 | 5886 |
| 5887 void MacroAssembler::LoadAccessor(Register dst, Register holder, |
| 5888 int accessor_index, |
| 5889 AccessorComponent accessor) { |
| 5890 lw(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); |
| 5891 LoadInstanceDescriptors(dst, dst); |
| 5892 lw(dst, |
| 5893 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); |
| 5894 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset |
| 5895 : AccessorPair::kSetterOffset; |
| 5896 lw(dst, FieldMemOperand(dst, offset)); |
| 5897 } |
| 5898 |
| 5899 |
| 5887 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { | 5900 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { |
| 5888 Register empty_fixed_array_value = t2; | 5901 Register empty_fixed_array_value = t2; |
| 5889 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); | 5902 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
| 5890 Label next, start; | 5903 Label next, start; |
| 5891 mov(a2, a0); | 5904 mov(a2, a0); |
| 5892 | 5905 |
| 5893 // Check if the enum length field is properly initialized, indicating that | 5906 // Check if the enum length field is properly initialized, indicating that |
| 5894 // there is an enum cache. | 5907 // there is an enum cache. |
| 5895 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); | 5908 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); |
| 5896 | 5909 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6144 } | 6157 } |
| 6145 if (mag.shift > 0) sra(result, result, mag.shift); | 6158 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6146 srl(at, dividend, 31); | 6159 srl(at, dividend, 31); |
| 6147 Addu(result, result, Operand(at)); | 6160 Addu(result, result, Operand(at)); |
| 6148 } | 6161 } |
| 6149 | 6162 |
| 6150 | 6163 |
| 6151 } } // namespace v8::internal | 6164 } } // namespace v8::internal |
| 6152 | 6165 |
| 6153 #endif // V8_TARGET_ARCH_MIPS | 6166 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |