Commit 99796f04 authored by jyan's avatar jyan Committed by Commit bot

S390: Fix allocation-site-info.js failure

Mask used in MacroAssembler::TestJSArrayForAllocationMemento was not supposed
to shifted right by 16 bits before loaded in to register r0.

R=michael_dawson@ca.ibm.com,mbrandy@us.ibm.com,joransiu@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1852403002

Cr-Commit-Position: refs/heads/master@{#35247}
parent 6beb0690
......@@ -3558,27 +3558,25 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
ExternalReference::new_space_allocation_top_address(isolate());
const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize;
Register mask = scratch2_reg;
DCHECK(!AreAliased(receiver_reg, scratch_reg, mask));
DCHECK(!AreAliased(receiver_reg, scratch_reg));
// Bail out if the object is not in new space.
JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0);
LoadImmP(mask, Operand((~Page::kPageAlignmentMask >> 16)));
AddP(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
// If the object is in new space, we need to check whether it is on the same
// page as the current top.
XorP(r0, scratch_reg, Operand(new_space_allocation_top));
AndP(r0, r0, mask);
AndP(r0, r0, Operand(~Page::kPageAlignmentMask));
beq(&top_check, Label::kNear);
// 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.
XorP(r0, scratch_reg, receiver_reg);
AndP(r0, r0, mask);
AndP(r0, r0, Operand(~Page::kPageAlignmentMask));
bne(no_memento_found);
// Continue with the actual map check.
b(&map_check, Label::kNear);
......
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