Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 33b557e43cdd702d1e364a6564151cd63166b476..77ee36eae0b1d25a55bc930a416889c4c0401728 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -1617,6 +1617,18 @@ void MacroAssembler::AllocateInNewSpace(int object_size, |
ldr(ip, MemOperand(topaddr, limit - top)); |
} |
+ if ((flags & DOUBLE_ALIGNMENT) != 0) { |
+ // Align the next allocation. Storing the filler map without checking top is |
+ // always safe because the limit of the heap is always aligned. |
+ ASSERT(kPointerAlignment * 2 == kDoubleAlignment); |
+ and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC); |
+ Label aligned; |
+ b(eq, &aligned); |
+ mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); |
+ str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex)); |
+ bind(&aligned); |
+ } |
+ |
// Calculate new top and bail out if new space is exhausted. Use result |
// to calculate the new top. |
if (obj_size_operand.is_single_instruction(this)) { |
@@ -1702,6 +1714,18 @@ void MacroAssembler::AllocateInNewSpace(Register object_size, |
ldr(ip, MemOperand(topaddr, limit - top)); |
} |
+ if ((flags & DOUBLE_ALIGNMENT) != 0) { |
+ // Align the next allocation. Storing the filler map without checking top is |
+ // always safe because the limit of the heap is always aligned. |
+ ASSERT(kPointerAlignment * 2 == kDoubleAlignment); |
+ and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC); |
+ Label aligned; |
+ b(eq, &aligned); |
+ mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); |
+ str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex)); |
+ bind(&aligned); |
+ } |
+ |
// Calculate new top and bail out if new space is exhausted. Use result |
// to calculate the new top. Object size may be in words so a shift is |
// required to get the number of bytes. |