| 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2822 | 2822 |
| 2823 // If the value is black or grey we don't need to do anything. | 2823 // If the value is black or grey we don't need to do anything. |
| 2824 DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0); | 2824 DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0); |
| 2825 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); | 2825 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); |
| 2826 DCHECK(strcmp(Marking::kGreyBitPattern, "11") == 0); | 2826 DCHECK(strcmp(Marking::kGreyBitPattern, "11") == 0); |
| 2827 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); | 2827 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); |
| 2828 | 2828 |
| 2829 // Since both black and grey have a 1 in the first position and white does | 2829 // Since both black and grey have a 1 in the first position and white does |
| 2830 // not have a 1 there we only need to check one bit. | 2830 // not have a 1 there we only need to check one bit. |
| 2831 test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); | 2831 test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); |
| 2832 j(zero, &value_is_white, Label::kNear); | 2832 j(zero, value_is_white, Label::kNear); |
| 2833 } | 2833 } |
| 2834 | 2834 |
| 2835 | 2835 |
| 2836 void MacroAssembler::EnumLength(Register dst, Register map) { | 2836 void MacroAssembler::EnumLength(Register dst, Register map) { |
| 2837 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); | 2837 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); |
| 2838 mov(dst, FieldOperand(map, Map::kBitField3Offset)); | 2838 mov(dst, FieldOperand(map, Map::kBitField3Offset)); |
| 2839 and_(dst, Immediate(Map::EnumLengthBits::kMask)); | 2839 and_(dst, Immediate(Map::EnumLengthBits::kMask)); |
| 2840 SmiTag(dst); | 2840 SmiTag(dst); |
| 2841 } | 2841 } |
| 2842 | 2842 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2953 mov(eax, dividend); | 2953 mov(eax, dividend); |
| 2954 shr(eax, 31); | 2954 shr(eax, 31); |
| 2955 add(edx, eax); | 2955 add(edx, eax); |
| 2956 } | 2956 } |
| 2957 | 2957 |
| 2958 | 2958 |
| 2959 } // namespace internal | 2959 } // namespace internal |
| 2960 } // namespace v8 | 2960 } // namespace v8 |
| 2961 | 2961 |
| 2962 #endif // V8_TARGET_ARCH_X87 | 2962 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |