Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 332ac4c6f2e861c52f41595a218a6e9a93d72c2d..a58084cfbef4f76a98e8ce55691b7ba81ba77175 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -6609,7 +6609,7 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, |
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; |
@@ -6619,7 +6619,9 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, |
// 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)); |
- Xor(scratch_reg, scratch_reg, Operand(new_space_allocation_top)); |
+ li(at, Operand(new_space_allocation_top_adr)); |
+ lw(at, MemOperand(at)); |
+ Xor(scratch_reg, scratch_reg, Operand(at)); |
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 |
@@ -6635,7 +6637,7 @@ void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, |
// we are below top. |
bind(&top_check); |
Addu(scratch_reg, receiver_reg, Operand(kMementoEndOffset)); |
- li(at, Operand(new_space_allocation_top)); |
+ li(at, Operand(new_space_allocation_top_adr)); |
lw(at, MemOperand(at)); |
Branch(no_memento_found, gt, scratch_reg, Operand(at)); |
// Memento map check. |