Commit bbb8ff19 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS64: Fix 'Remove usages of Heap::NewSpaceStart and its external reference'.

Port f2a58593

Original commit message:
Replace the uses with proper page flag lookups.

BUG=chromium:581412
LOG=N
TEST=mjsunit/allocation-site-info

Review-Url: https://codereview.chromium.org/1989483002
Cr-Commit-Position: refs/heads/master@{#36289}
parent 34c9626e
......@@ -6967,14 +6967,14 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
// If the object is in new space, we need to check whether it is on the same
// page as the current top.
Addu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
Xor(scratch_reg, scratch_reg, Operand(new_space_allocation_top));
And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask));
Branch(&top_check, eq, scratch_reg, Operand(zero_reg));
// The object is on a different page than allocation top. Bail out if the
// object sits on the page boundary as no memento can follow and we cannot
// touch the memory following it.
Addu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
Xor(scratch_reg, scratch_reg, Operand(receiver_reg));
And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask));
Branch(no_memento_found, ne, scratch_reg, Operand(zero_reg));
......@@ -6983,13 +6983,13 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
// If top is on the same page as the current object, we need to check whether
// we are below top.
bind(&top_check);
Addu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
li(at, Operand(new_space_allocation_top));
lw(at, MemOperand(at));
ld(at, MemOperand(at));
Branch(no_memento_found, gt, scratch_reg, Operand(at));
// Memento map check.
bind(&map_check);
lw(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
ld(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
Branch(no_memento_found, ne, scratch_reg,
Operand(isolate()->factory()->allocation_memento_map()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment