| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2910 // Interleave bits from both instance types and compare them in one check. | 2910 // Interleave bits from both instance types and compare them in one check. |
| 2911 DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3)); | 2911 DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3)); |
| 2912 and_(scratch1, kFlatOneByteStringMask); | 2912 and_(scratch1, kFlatOneByteStringMask); |
| 2913 and_(scratch2, kFlatOneByteStringMask); | 2913 and_(scratch2, kFlatOneByteStringMask); |
| 2914 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); | 2914 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); |
| 2915 cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << 3)); | 2915 cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << 3)); |
| 2916 j(not_equal, failure); | 2916 j(not_equal, failure); |
| 2917 } | 2917 } |
| 2918 | 2918 |
| 2919 | 2919 |
| 2920 void MacroAssembler::JumpIfNotUniqueName(Operand operand, | 2920 void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand, |
| 2921 Label* not_unique_name, | 2921 Label* not_unique_name, |
| 2922 Label::Distance distance) { | 2922 Label::Distance distance) { |
| 2923 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); | 2923 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); |
| 2924 Label succeed; | 2924 Label succeed; |
| 2925 test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); | 2925 test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); |
| 2926 j(zero, &succeed); | 2926 j(zero, &succeed); |
| 2927 cmpb(operand, static_cast<uint8_t>(SYMBOL_TYPE)); | 2927 cmpb(operand, static_cast<uint8_t>(SYMBOL_TYPE)); |
| 2928 j(not_equal, not_unique_name, distance); | 2928 j(not_equal, not_unique_name, distance); |
| 2929 | 2929 |
| 2930 bind(&succeed); | 2930 bind(&succeed); |
| 2931 } | 2931 } |
| 2932 | 2932 |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3394 if (mag.shift > 0) sar(edx, mag.shift); | 3394 if (mag.shift > 0) sar(edx, mag.shift); |
| 3395 mov(eax, dividend); | 3395 mov(eax, dividend); |
| 3396 shr(eax, 31); | 3396 shr(eax, 31); |
| 3397 add(edx, eax); | 3397 add(edx, eax); |
| 3398 } | 3398 } |
| 3399 | 3399 |
| 3400 | 3400 |
| 3401 } } // namespace v8::internal | 3401 } } // namespace v8::internal |
| 3402 | 3402 |
| 3403 #endif // V8_TARGET_ARCH_IA32 | 3403 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |