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

Unified Diff: src/arm64/macro-assembler-arm64.cc

Issue 2065063002: [Heap] Fix comparing against new space top pointer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation errors Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/macro-assembler-arm64.cc
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
index 2c0fd16b56ca8292a694cfa88b35580f8360bbba..fd70711c34ea64eb3f059d27e5f03c498fd45edf 100644
--- a/src/arm64/macro-assembler-arm64.cc
+++ b/src/arm64/macro-assembler-arm64.cc
@@ -1536,7 +1536,7 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver,
Label* no_memento_found) {
Label map_check;
Label top_check;
- ExternalReference new_space_allocation_top =
+ ExternalReference new_space_allocation_top_adr =
ExternalReference::new_space_allocation_top_address(isolate());
const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize;
@@ -1546,7 +1546,9 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver,
Add(scratch1, receiver, kMementoEndOffset);
// If the object is in new space, we need to check whether it is on the same
// page as the current top.
- Eor(scratch2, scratch1, new_space_allocation_top);
+ Mov(scratch2, new_space_allocation_top_adr);
+ Ldr(scratch2, MemOperand(scratch2));
+ Eor(scratch2, scratch1, scratch2);
Tst(scratch2, ~Page::kPageAlignmentMask);
B(eq, &top_check);
// The object is on a different page than allocation top. Bail out if the
@@ -1560,7 +1562,9 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver,
// If top is on the same page as the current object, we need to check whether
// we are below top.
bind(&top_check);
- Cmp(scratch1, new_space_allocation_top);
+ Mov(scratch2, new_space_allocation_top_adr);
+ Ldr(scratch2, MemOperand(scratch2));
+ Cmp(scratch1, scratch2);
B(gt, no_memento_found);
// Memento map check.
bind(&map_check);
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698