diff --git a/src/x87/codegen-x87.cc b/src/x87/codegen-x87.cc index 06b6262a9b..8112d11d13 100644 --- a/src/x87/codegen-x87.cc +++ b/src/x87/codegen-x87.cc @@ -275,9 +275,9 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( // Allocate new FixedDoubleArray. // edx: receiver // edi: length of source FixedArray (smi-tagged) + AllocationFlags flags = static_cast(DOUBLE_ALIGNMENT); __ Allocate(FixedDoubleArray::kHeaderSize, times_8, edi, - REGISTER_VALUE_IS_SMI, eax, ebx, no_reg, &gc_required, - DOUBLE_ALIGNMENT); + REGISTER_VALUE_IS_SMI, eax, ebx, no_reg, &gc_required, flags); // eax: destination FixedDoubleArray // edi: number of elements diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc index 840913797c..068cc5f01e 100644 --- a/src/x87/macro-assembler-x87.cc +++ b/src/x87/macro-assembler-x87.cc @@ -1520,10 +1520,10 @@ void MacroAssembler::Allocate(int object_size, // Update allocation top. UpdateAllocationTopHelper(top_reg, scratch, flags); - // Tag result if requested. if (top_reg.is(result)) { sub(result, Immediate(object_size - kHeapObjectTag)); } else { + // Tag the result. DCHECK(kHeapObjectTag == 1); inc(result); } @@ -1597,6 +1597,7 @@ void MacroAssembler::Allocate(int header_size, cmp(result_end, Operand::StaticVariable(allocation_limit)); j(above, gc_required); + // Tag result. DCHECK(kHeapObjectTag == 1); inc(result);