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

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

Issue 1632913003: [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips ports Created 4 years, 10 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/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.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 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); 445 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index));
446 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); 446 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond);
447 } 447 }
448 448
449 449
450 void MacroAssembler::InNewSpace(Register object, 450 void MacroAssembler::InNewSpace(Register object,
451 Register scratch, 451 Register scratch,
452 Condition cond, 452 Condition cond,
453 Label* branch) { 453 Label* branch) {
454 DCHECK(cond == eq || cond == ne); 454 DCHECK(cond == eq || cond == ne);
455 and_(scratch, object, Operand(ExternalReference::new_space_mask(isolate()))); 455 const int mask =
456 cmp(scratch, Operand(ExternalReference::new_space_start(isolate()))); 456 (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE);
457 b(cond, branch); 457 CheckPageFlag(object, scratch, mask, cond, branch);
458 } 458 }
459 459
460 460
461 void MacroAssembler::RecordWriteField( 461 void MacroAssembler::RecordWriteField(
462 Register object, 462 Register object,
463 int offset, 463 int offset,
464 Register value, 464 Register value,
465 Register dst, 465 Register dst,
466 LinkRegisterStatus lr_status, 466 LinkRegisterStatus lr_status,
467 SaveFPRegsMode save_fp, 467 SaveFPRegsMode save_fp,
(...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
3306 } 3306 }
3307 } 3307 }
3308 3308
3309 3309
3310 void MacroAssembler::CheckPageFlag( 3310 void MacroAssembler::CheckPageFlag(
3311 Register object, 3311 Register object,
3312 Register scratch, 3312 Register scratch,
3313 int mask, 3313 int mask,
3314 Condition cc, 3314 Condition cc,
3315 Label* condition_met) { 3315 Label* condition_met) {
3316 DCHECK(cc == eq || cc == ne);
3316 Bfc(scratch, object, 0, kPageSizeBits); 3317 Bfc(scratch, object, 0, kPageSizeBits);
3317 ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset)); 3318 ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset));
3318 tst(scratch, Operand(mask)); 3319 tst(scratch, Operand(mask));
3319 b(cc, condition_met); 3320 b(cc, condition_met);
3320 } 3321 }
3321 3322
3322 3323
3323 void MacroAssembler::JumpIfBlack(Register object, 3324 void MacroAssembler::JumpIfBlack(Register object,
3324 Register scratch0, 3325 Register scratch0,
3325 Register scratch1, 3326 Register scratch1,
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 } 3674 }
3674 } 3675 }
3675 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3676 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3676 add(result, result, Operand(dividend, LSR, 31)); 3677 add(result, result, Operand(dividend, LSR, 31));
3677 } 3678 }
3678 3679
3679 } // namespace internal 3680 } // namespace internal
3680 } // namespace v8 3681 } // namespace v8
3681 3682
3682 #endif // V8_TARGET_ARCH_ARM 3683 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698