Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index bd51493e09f9f114f13aa8f294330555bc9699c1..1c404365195df213d96051864bae353ebdc0753d 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -4142,14 +4142,14 @@ |
// Align the next allocation. Storing the filler map without checking top is |
// safe in new-space because the limit of the heap is aligned there. |
DCHECK(kPointerAlignment * 2 == kDoubleAlignment); |
- And(result_end, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(result_end, result, Operand(kDoubleAlignmentMask)); |
Label aligned; |
Branch(&aligned, eq, result_end, Operand(zero_reg)); |
if ((flags & PRETENURE) != 0) { |
Branch(gc_required, Ugreater_equal, result, Operand(alloc_limit)); |
} |
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map())); |
- sw(result_end, FieldMemOperand(result, 0)); |
+ sw(result_end, MemOperand(result)); |
Addu(result, result, Operand(kDoubleSize / 2)); |
bind(&aligned); |
} |
@@ -4163,6 +4163,9 @@ |
// The top pointer is not updated for allocation folding dominators. |
sw(result_end, MemOperand(top_address)); |
} |
+ |
+ // Tag object. |
+ Addu(result, result, Operand(kHeapObjectTag)); |
} |
@@ -4222,14 +4225,14 @@ |
// Align the next allocation. Storing the filler map without checking top is |
// safe in new-space because the limit of the heap is aligned there. |
DCHECK(kPointerAlignment * 2 == kDoubleAlignment); |
- And(result_end, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(result_end, result, Operand(kDoubleAlignmentMask)); |
Label aligned; |
Branch(&aligned, eq, result_end, Operand(zero_reg)); |
if ((flags & PRETENURE) != 0) { |
Branch(gc_required, Ugreater_equal, result, Operand(alloc_limit)); |
} |
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map())); |
- sw(result_end, FieldMemOperand(result, 0)); |
+ sw(result_end, MemOperand(result)); |
Addu(result, result, Operand(kDoubleSize / 2)); |
bind(&aligned); |
} |
@@ -4248,13 +4251,16 @@ |
// Update allocation top. result temporarily holds the new top. |
if (emit_debug_code()) { |
And(alloc_limit, result_end, Operand(kObjectAlignmentMask)); |
- Check(ne, kUnalignedAllocationInNewSpace, alloc_limit, Operand(zero_reg)); |
+ Check(eq, kUnalignedAllocationInNewSpace, alloc_limit, Operand(zero_reg)); |
} |
if ((flags & ALLOCATION_FOLDING_DOMINATOR) == 0) { |
// The top pointer is not updated for allocation folding dominators. |
sw(result_end, MemOperand(top_address)); |
} |
+ |
+ // Tag object. |
+ Addu(result, result, Operand(kHeapObjectTag)); |
} |
void MacroAssembler::FastAllocate(int object_size, Register result, |
@@ -4283,11 +4289,11 @@ |
// Align the next allocation. Storing the filler map without checking top is |
// safe in new-space because the limit of the heap is aligned there. |
DCHECK(kPointerAlignment * 2 == kDoubleAlignment); |
- And(result_end, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(result_end, result, Operand(kDoubleAlignmentMask)); |
Label aligned; |
Branch(&aligned, eq, result_end, Operand(zero_reg)); |
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map())); |
- sw(result_end, FieldMemOperand(result, 0)); |
+ sw(result_end, MemOperand(result)); |
Addu(result, result, Operand(kDoubleSize / 2)); |
bind(&aligned); |
} |
@@ -4296,6 +4302,8 @@ |
// The top pointer is not updated for allocation folding dominators. |
sw(result_end, MemOperand(top_address)); |
+ |
+ Addu(result, result, Operand(kHeapObjectTag)); |
} |
void MacroAssembler::FastAllocate(Register object_size, Register result, |
@@ -4320,11 +4328,11 @@ |
// Align the next allocation. Storing the filler map without checking top is |
// safe in new-space because the limit of the heap is aligned there. |
DCHECK(kPointerAlignment * 2 == kDoubleAlignment); |
- And(result_end, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(result_end, result, Operand(kDoubleAlignmentMask)); |
Label aligned; |
Branch(&aligned, eq, result_end, Operand(zero_reg)); |
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map())); |
- sw(result_end, FieldMemOperand(result, 0)); |
+ sw(result_end, MemOperand(result)); |
Addu(result, result, Operand(kDoubleSize / 2)); |
bind(&aligned); |
} |
@@ -4340,6 +4348,8 @@ |
// The top pointer is not updated for allocation folding dominators. |
sw(result_end, MemOperand(top_address)); |
+ |
+ Addu(result, result, Operand(kHeapObjectTag)); |
} |
void MacroAssembler::AllocateTwoByteString(Register result, |