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

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

Issue 11931013: Revert trunk to version 3.16.4. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/cctest/test-api.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 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 2211
2212 // Load instance type for both strings. 2212 // Load instance type for both strings.
2213 movq(scratch1, FieldOperand(first_object, HeapObject::kMapOffset)); 2213 movq(scratch1, FieldOperand(first_object, HeapObject::kMapOffset));
2214 movq(scratch2, FieldOperand(second_object, HeapObject::kMapOffset)); 2214 movq(scratch2, FieldOperand(second_object, HeapObject::kMapOffset));
2215 movzxbl(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset)); 2215 movzxbl(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset));
2216 movzxbl(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset)); 2216 movzxbl(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset));
2217 2217
2218 // Check that both are flat ASCII strings. 2218 // Check that both are flat ASCII strings.
2219 ASSERT(kNotStringTag != 0); 2219 ASSERT(kNotStringTag != 0);
2220 const int kFlatAsciiStringMask = 2220 const int kFlatAsciiStringMask =
2221 kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; 2221 kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask |
2222 kStringRepresentationMask;
2222 const int kFlatAsciiStringTag = ASCII_STRING_TYPE; 2223 const int kFlatAsciiStringTag = ASCII_STRING_TYPE;
2223 2224
2224 andl(scratch1, Immediate(kFlatAsciiStringMask)); 2225 andl(scratch1, Immediate(kFlatAsciiStringMask));
2225 andl(scratch2, Immediate(kFlatAsciiStringMask)); 2226 andl(scratch2, Immediate(kFlatAsciiStringMask));
2226 // Interleave the bits to check both scratch1 and scratch2 in one test. 2227 // Interleave the bits to check both scratch1 and scratch2 in one test.
2227 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); 2228 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 8));
2228 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); 2229 ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
2230 shl(scratch1, Immediate(8));
2231 orl(scratch1, scratch2);
2229 cmpl(scratch1, 2232 cmpl(scratch1,
2230 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); 2233 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 8)));
2231 j(not_equal, on_fail, near_jump); 2234 j(not_equal, on_fail, near_jump);
2232 } 2235 }
2233 2236
2234 2237
2235 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii( 2238 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(
2236 Register instance_type, 2239 Register instance_type,
2237 Register scratch, 2240 Register scratch,
2238 Label* failure, 2241 Label* failure,
2239 Label::Distance near_jump) { 2242 Label::Distance near_jump) {
2240 if (!scratch.is(instance_type)) { 2243 if (!scratch.is(instance_type)) {
(...skipping 15 matching lines...) Expand all
2256 Register scratch1, 2259 Register scratch1,
2257 Register scratch2, 2260 Register scratch2,
2258 Label* on_fail, 2261 Label* on_fail,
2259 Label::Distance near_jump) { 2262 Label::Distance near_jump) {
2260 // Load instance type for both strings. 2263 // Load instance type for both strings.
2261 movq(scratch1, first_object_instance_type); 2264 movq(scratch1, first_object_instance_type);
2262 movq(scratch2, second_object_instance_type); 2265 movq(scratch2, second_object_instance_type);
2263 2266
2264 // Check that both are flat ASCII strings. 2267 // Check that both are flat ASCII strings.
2265 ASSERT(kNotStringTag != 0); 2268 ASSERT(kNotStringTag != 0);
2266 const int kFlatAsciiStringMask = 2269 const int kFlatAsciiStringMask = kIsNotStringMask | kStringRepresentationMask
2267 kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; 2270 | kStringEncodingMask | kAsciiDataHintTag;
2268 const int kFlatAsciiStringTag = ASCII_STRING_TYPE; 2271 const int kFlatAsciiStringTag = ASCII_STRING_TYPE;
2269 2272
2270 andl(scratch1, Immediate(kFlatAsciiStringMask)); 2273 andl(scratch1, Immediate(kFlatAsciiStringMask));
2271 andl(scratch2, Immediate(kFlatAsciiStringMask)); 2274 andl(scratch2, Immediate(kFlatAsciiStringMask));
2272 // Interleave the bits to check both scratch1 and scratch2 in one test. 2275 // Interleave the bits to check both scratch1 and scratch2 in one test.
2273 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); 2276 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 8));
2274 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); 2277 ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
2278 shl(scratch1, Immediate(8));
2279 orl(scratch1, scratch2);
2275 cmpl(scratch1, 2280 cmpl(scratch1,
2276 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); 2281 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 8)));
2277 j(not_equal, on_fail, near_jump); 2282 j(not_equal, on_fail, near_jump);
2278 } 2283 }
2279 2284
2280 2285
2281 2286
2282 void MacroAssembler::Move(Register dst, Register src) { 2287 void MacroAssembler::Move(Register dst, Register src) {
2283 if (!dst.is(src)) { 2288 if (!dst.is(src)) {
2284 movq(dst, src); 2289 movq(dst, src);
2285 } 2290 }
2286 } 2291 }
(...skipping 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after
4624 CompareRoot(MemOperand(scratch_reg, 0), 4629 CompareRoot(MemOperand(scratch_reg, 0),
4625 Heap::kAllocationSiteInfoMapRootIndex); 4630 Heap::kAllocationSiteInfoMapRootIndex);
4626 j(equal, allocation_info_present); 4631 j(equal, allocation_info_present);
4627 bind(&no_info_available); 4632 bind(&no_info_available);
4628 } 4633 }
4629 4634
4630 4635
4631 } } // namespace v8::internal 4636 } } // namespace v8::internal
4632 4637
4633 #endif // V8_TARGET_ARCH_X64 4638 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698