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

Side by Side Diff: src/arm64/macro-assembler-arm64.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/arm64/macro-assembler-arm64.h ('k') | src/arm64/simulator-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 Cmp(scratch1, 1567 Cmp(scratch1,
1568 Operand(isolate()->factory()->allocation_memento_map())); 1568 Operand(isolate()->factory()->allocation_memento_map()));
1569 } 1569 }
1570 1570
1571 1571
1572 void MacroAssembler::InNewSpace(Register object, 1572 void MacroAssembler::InNewSpace(Register object,
1573 Condition cond, 1573 Condition cond,
1574 Label* branch) { 1574 Label* branch) {
1575 DCHECK(cond == eq || cond == ne); 1575 DCHECK(cond == eq || cond == ne);
1576 UseScratchRegisterScope temps(this); 1576 UseScratchRegisterScope temps(this);
1577 Register temp = temps.AcquireX(); 1577 const int mask =
1578 And(temp, object, ExternalReference::new_space_mask(isolate())); 1578 (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE);
1579 Cmp(temp, ExternalReference::new_space_start(isolate())); 1579 CheckPageFlag(object, temps.AcquireSameSizeAs(object), mask, cond, branch);
1580 B(cond, branch);
1581 } 1580 }
1582 1581
1583 1582
1584 void MacroAssembler::AssertSmi(Register object, BailoutReason reason) { 1583 void MacroAssembler::AssertSmi(Register object, BailoutReason reason) {
1585 if (emit_debug_code()) { 1584 if (emit_debug_code()) {
1586 STATIC_ASSERT(kSmiTag == 0); 1585 STATIC_ASSERT(kSmiTag == 0);
1587 Tst(object, kSmiTagMask); 1586 Tst(object, kSmiTagMask);
1588 Check(eq, reason); 1587 Check(eq, reason);
1589 } 1588 }
1590 } 1589 }
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after
3984 } else if ((reg_code == 29) || (reg_code == 30)) { 3983 } else if ((reg_code == 29) || (reg_code == 30)) {
3985 // Also skip jssp. 3984 // Also skip jssp.
3986 return reg_code - 3; 3985 return reg_code - 3;
3987 } else { 3986 } else {
3988 // This register has no safepoint register slot. 3987 // This register has no safepoint register slot.
3989 UNREACHABLE(); 3988 UNREACHABLE();
3990 return -1; 3989 return -1;
3991 } 3990 }
3992 } 3991 }
3993 3992
3993 void MacroAssembler::CheckPageFlag(const Register& object,
3994 const Register& scratch, int mask,
3995 Condition cc, Label* condition_met) {
3996 And(scratch, object, ~Page::kPageAlignmentMask);
3997 Ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset));
3998 if (cc == eq) {
3999 TestAndBranchIfAnySet(scratch, mask, condition_met);
4000 } else {
4001 TestAndBranchIfAllClear(scratch, mask, condition_met);
4002 }
4003 }
3994 4004
3995 void MacroAssembler::CheckPageFlagSet(const Register& object, 4005 void MacroAssembler::CheckPageFlagSet(const Register& object,
3996 const Register& scratch, 4006 const Register& scratch,
3997 int mask, 4007 int mask,
3998 Label* if_any_set) { 4008 Label* if_any_set) {
3999 And(scratch, object, ~Page::kPageAlignmentMask); 4009 And(scratch, object, ~Page::kPageAlignmentMask);
4000 Ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset)); 4010 Ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset));
4001 TestAndBranchIfAnySet(scratch, mask, if_any_set); 4011 TestAndBranchIfAnySet(scratch, mask, if_any_set);
4002 } 4012 }
4003 4013
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
4953 } 4963 }
4954 4964
4955 4965
4956 #undef __ 4966 #undef __
4957 4967
4958 4968
4959 } // namespace internal 4969 } // namespace internal
4960 } // namespace v8 4970 } // namespace v8
4961 4971
4962 #endif // V8_TARGET_ARCH_ARM64 4972 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/arm64/simulator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698