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

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

Issue 19514004: In MacroAssembler::JumpIfNotBothSequentialAsciiStrings a custom mask (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update after comments with fixes Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/macro-assembler-mips.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 2791
2792 // Load instance type for both strings. 2792 // Load instance type for both strings.
2793 mov(scratch1, FieldOperand(object1, HeapObject::kMapOffset)); 2793 mov(scratch1, FieldOperand(object1, HeapObject::kMapOffset));
2794 mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset)); 2794 mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset));
2795 movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset)); 2795 movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset));
2796 movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset)); 2796 movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset));
2797 2797
2798 // Check that both are flat ASCII strings. 2798 // Check that both are flat ASCII strings.
2799 const int kFlatAsciiStringMask = 2799 const int kFlatAsciiStringMask =
2800 kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; 2800 kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
2801 const int kFlatAsciiStringTag = ASCII_STRING_TYPE; 2801 const int kFlatAsciiStringTag =
2802 kStringTag | kOneByteStringTag | kSeqStringTag;
2802 // Interleave bits from both instance types and compare them in one check. 2803 // Interleave bits from both instance types and compare them in one check.
2803 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); 2804 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3));
2804 and_(scratch1, kFlatAsciiStringMask); 2805 and_(scratch1, kFlatAsciiStringMask);
2805 and_(scratch2, kFlatAsciiStringMask); 2806 and_(scratch2, kFlatAsciiStringMask);
2806 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); 2807 lea(scratch1, Operand(scratch1, scratch2, times_8, 0));
2807 cmp(scratch1, kFlatAsciiStringTag | (kFlatAsciiStringTag << 3)); 2808 cmp(scratch1, kFlatAsciiStringTag | (kFlatAsciiStringTag << 3));
2808 j(not_equal, failure); 2809 j(not_equal, failure);
2809 } 2810 }
2810 2811
2811 2812
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 j(greater, &no_memento_available); 3185 j(greater, &no_memento_available);
3185 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), 3186 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize),
3186 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map()))); 3187 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map())));
3187 bind(&no_memento_available); 3188 bind(&no_memento_available);
3188 } 3189 }
3189 3190
3190 3191
3191 } } // namespace v8::internal 3192 } } // namespace v8::internal
3192 3193
3193 #endif // V8_TARGET_ARCH_IA32 3194 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698