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

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: Fix arm 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
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 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after
3305 } 3305 }
3306 } 3306 }
3307 3307
3308 3308
3309 void MacroAssembler::CheckPageFlag( 3309 void MacroAssembler::CheckPageFlag(
3310 Register object, 3310 Register object,
3311 Register scratch, 3311 Register scratch,
3312 int mask, 3312 int mask,
3313 Condition cc, 3313 Condition cc,
3314 Label* condition_met) { 3314 Label* condition_met) {
3315 DCHECK(cc == eq || cc == ne);
3315 Bfc(scratch, object, 0, kPageSizeBits); 3316 Bfc(scratch, object, 0, kPageSizeBits);
3316 ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset)); 3317 ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset));
3317 tst(scratch, Operand(mask)); 3318 tst(scratch, Operand(mask));
3318 b(cc, condition_met); 3319 b(cc, condition_met);
3319 } 3320 }
3320 3321
3321 3322
3322 void MacroAssembler::JumpIfBlack(Register object, 3323 void MacroAssembler::JumpIfBlack(Register object,
3323 Register scratch0, 3324 Register scratch0,
3324 Register scratch1, 3325 Register scratch1,
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3672 } 3673 }
3673 } 3674 }
3674 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3675 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3675 add(result, result, Operand(dividend, LSR, 31)); 3676 add(result, result, Operand(dividend, LSR, 31));
3676 } 3677 }
3677 3678
3678 } // namespace internal 3679 } // namespace internal
3679 } // namespace v8 3680 } // namespace v8
3680 3681
3681 #endif // V8_TARGET_ARCH_ARM 3682 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698