| 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 5777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5788 DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0); | 5788 DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0); |
| 5789 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); | 5789 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); |
| 5790 DCHECK(strcmp(Marking::kGreyBitPattern, "11") == 0); | 5790 DCHECK(strcmp(Marking::kGreyBitPattern, "11") == 0); |
| 5791 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); | 5791 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); |
| 5792 | 5792 |
| 5793 Label done; | 5793 Label done; |
| 5794 | 5794 |
| 5795 // Since both black and grey have a 1 in the first position and white does | 5795 // Since both black and grey have a 1 in the first position and white does |
| 5796 // not have a 1 there we only need to check one bit. | 5796 // not have a 1 there we only need to check one bit. |
| 5797 // Note that we are using a 4-byte aligned 8-byte load. | 5797 // Note that we are using a 4-byte aligned 8-byte load. |
| 5798 LoadWordPair(load_scratch, | 5798 if (emit_debug_code()) { |
| 5799 MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); | 5799 LoadWordPair(load_scratch, |
| 5800 MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); |
| 5801 } else { |
| 5802 lwu(load_scratch, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); |
| 5803 } |
| 5800 And(t8, mask_scratch, load_scratch); | 5804 And(t8, mask_scratch, load_scratch); |
| 5801 Branch(&done, ne, t8, Operand(zero_reg)); | 5805 Branch(&done, ne, t8, Operand(zero_reg)); |
| 5802 | 5806 |
| 5803 if (emit_debug_code()) { | 5807 if (emit_debug_code()) { |
| 5804 // Check for impossible bit pattern. | 5808 // Check for impossible bit pattern. |
| 5805 Label ok; | 5809 Label ok; |
| 5806 // sll may overflow, making the check conservative. | 5810 // sll may overflow, making the check conservative. |
| 5807 dsll(t8, mask_scratch, 1); | 5811 dsll(t8, mask_scratch, 1); |
| 5808 And(t8, load_scratch, t8); | 5812 And(t8, load_scratch, t8); |
| 5809 Branch(&ok, eq, t8, Operand(zero_reg)); | 5813 Branch(&ok, eq, t8, Operand(zero_reg)); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5868 dsll(t9, t9, 1); | 5872 dsll(t9, t9, 1); |
| 5869 bind(&skip); | 5873 bind(&skip); |
| 5870 } | 5874 } |
| 5871 Daddu(length, t9, Operand(SeqString::kHeaderSize + kObjectAlignmentMask)); | 5875 Daddu(length, t9, Operand(SeqString::kHeaderSize + kObjectAlignmentMask)); |
| 5872 DCHECK(!length.is(t8)); | 5876 DCHECK(!length.is(t8)); |
| 5873 And(length, length, Operand(~kObjectAlignmentMask)); | 5877 And(length, length, Operand(~kObjectAlignmentMask)); |
| 5874 | 5878 |
| 5875 bind(&is_data_object); | 5879 bind(&is_data_object); |
| 5876 // Value is a data object, and it is white. Mark it black. Since we know | 5880 // Value is a data object, and it is white. Mark it black. Since we know |
| 5877 // that the object is white we can make it black by flipping one bit. | 5881 // that the object is white we can make it black by flipping one bit. |
| 5878 LoadWordPair(t8, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); | 5882 lw(t8, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); |
| 5879 Or(t8, t8, Operand(mask_scratch)); | 5883 Or(t8, t8, Operand(mask_scratch)); |
| 5880 StoreWordPair(t8, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); | 5884 sw(t8, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); |
| 5881 | 5885 |
| 5882 And(bitmap_scratch, bitmap_scratch, Operand(~Page::kPageAlignmentMask)); | 5886 And(bitmap_scratch, bitmap_scratch, Operand(~Page::kPageAlignmentMask)); |
| 5883 LoadWordPair(t8, MemOperand(bitmap_scratch, MemoryChunk::kLiveBytesOffset)); | 5887 lw(t8, MemOperand(bitmap_scratch, MemoryChunk::kLiveBytesOffset)); |
| 5884 Daddu(t8, t8, Operand(length)); | 5888 Addu(t8, t8, Operand(length)); |
| 5885 StoreWordPair(t8, MemOperand(bitmap_scratch, MemoryChunk::kLiveBytesOffset)); | 5889 sw(t8, MemOperand(bitmap_scratch, MemoryChunk::kLiveBytesOffset)); |
| 5886 | 5890 |
| 5887 bind(&done); | 5891 bind(&done); |
| 5888 } | 5892 } |
| 5889 | 5893 |
| 5890 | 5894 |
| 5891 void MacroAssembler::LoadInstanceDescriptors(Register map, | 5895 void MacroAssembler::LoadInstanceDescriptors(Register map, |
| 5892 Register descriptors) { | 5896 Register descriptors) { |
| 5893 ld(descriptors, FieldMemOperand(map, Map::kDescriptorsOffset)); | 5897 ld(descriptors, FieldMemOperand(map, Map::kDescriptorsOffset)); |
| 5894 } | 5898 } |
| 5895 | 5899 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6192 if (mag.shift > 0) sra(result, result, mag.shift); | 6196 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6193 srl(at, dividend, 31); | 6197 srl(at, dividend, 31); |
| 6194 Addu(result, result, Operand(at)); | 6198 Addu(result, result, Operand(at)); |
| 6195 } | 6199 } |
| 6196 | 6200 |
| 6197 | 6201 |
| 6198 } // namespace internal | 6202 } // namespace internal |
| 6199 } // namespace v8 | 6203 } // namespace v8 |
| 6200 | 6204 |
| 6201 #endif // V8_TARGET_ARCH_MIPS64 | 6205 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |