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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2787 // Interleave bits from both instance types and compare them in one check. | 2787 // Interleave bits from both instance types and compare them in one check. |
2788 DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3)); | 2788 DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3)); |
2789 and_(scratch1, kFlatOneByteStringMask); | 2789 and_(scratch1, kFlatOneByteStringMask); |
2790 and_(scratch2, kFlatOneByteStringMask); | 2790 and_(scratch2, kFlatOneByteStringMask); |
2791 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); | 2791 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); |
2792 cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << 3)); | 2792 cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << 3)); |
2793 j(not_equal, failure); | 2793 j(not_equal, failure); |
2794 } | 2794 } |
2795 | 2795 |
2796 | 2796 |
2797 void MacroAssembler::JumpIfNotUniqueName(Operand operand, | 2797 void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand, |
2798 Label* not_unique_name, | 2798 Label* not_unique_name, |
2799 Label::Distance distance) { | 2799 Label::Distance distance) { |
2800 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); | 2800 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); |
2801 Label succeed; | 2801 Label succeed; |
2802 test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); | 2802 test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); |
2803 j(zero, &succeed); | 2803 j(zero, &succeed); |
2804 cmpb(operand, static_cast<uint8_t>(SYMBOL_TYPE)); | 2804 cmpb(operand, static_cast<uint8_t>(SYMBOL_TYPE)); |
2805 j(not_equal, not_unique_name, distance); | 2805 j(not_equal, not_unique_name, distance); |
2806 | 2806 |
2807 bind(&succeed); | 2807 bind(&succeed); |
2808 } | 2808 } |
2809 | 2809 |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3271 if (mag.shift > 0) sar(edx, mag.shift); | 3271 if (mag.shift > 0) sar(edx, mag.shift); |
3272 mov(eax, dividend); | 3272 mov(eax, dividend); |
3273 shr(eax, 31); | 3273 shr(eax, 31); |
3274 add(edx, eax); | 3274 add(edx, eax); |
3275 } | 3275 } |
3276 | 3276 |
3277 | 3277 |
3278 } } // namespace v8::internal | 3278 } } // namespace v8::internal |
3279 | 3279 |
3280 #endif // V8_TARGET_ARCH_X87 | 3280 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |