Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/x87/macro-assembler-x87.cc

Issue 2627783006: Version 5.7.442.2 (cherry-pick) (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x87/codegen-x87.cc ('k') | test/cctest/test-code-stub-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2397 matching lines...) Expand 10 before | Expand all | Expand 10 after
2408 mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset)); 2408 mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset));
2409 movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset)); 2409 movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset));
2410 movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset)); 2410 movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset));
2411 2411
2412 // Check that both are flat one-byte strings. 2412 // Check that both are flat one-byte strings.
2413 const int kFlatOneByteStringMask = 2413 const int kFlatOneByteStringMask =
2414 kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; 2414 kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
2415 const int kFlatOneByteStringTag = 2415 const int kFlatOneByteStringTag =
2416 kStringTag | kOneByteStringTag | kSeqStringTag; 2416 kStringTag | kOneByteStringTag | kSeqStringTag;
2417 // Interleave bits from both instance types and compare them in one check. 2417 // Interleave bits from both instance types and compare them in one check.
2418 const int kShift = 8; 2418 DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3));
2419 DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << kShift));
2420 and_(scratch1, kFlatOneByteStringMask); 2419 and_(scratch1, kFlatOneByteStringMask);
2421 and_(scratch2, kFlatOneByteStringMask); 2420 and_(scratch2, kFlatOneByteStringMask);
2422 shl(scratch2, kShift); 2421 lea(scratch1, Operand(scratch1, scratch2, times_8, 0));
2423 or_(scratch1, scratch2); 2422 cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << 3));
2424 cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << kShift));
2425 j(not_equal, failure); 2423 j(not_equal, failure);
2426 } 2424 }
2427 2425
2428 2426
2429 void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand, 2427 void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand,
2430 Label* not_unique_name, 2428 Label* not_unique_name,
2431 Label::Distance distance) { 2429 Label::Distance distance) {
2432 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); 2430 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
2433 Label succeed; 2431 Label succeed;
2434 test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); 2432 test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask));
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 mov(eax, dividend); 2796 mov(eax, dividend);
2799 shr(eax, 31); 2797 shr(eax, 31);
2800 add(edx, eax); 2798 add(edx, eax);
2801 } 2799 }
2802 2800
2803 2801
2804 } // namespace internal 2802 } // namespace internal
2805 } // namespace v8 2803 } // namespace v8
2806 2804
2807 #endif // V8_TARGET_ARCH_X87 2805 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/codegen-x87.cc ('k') | test/cctest/test-code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698