| Index: src/code-stub-assembler.cc
|
| diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
|
| index be6bf6e2001f1779548aafd923fe26d288f7a483..a4bcceb329958f606518d67f69b5029144ea9eb7 100644
|
| --- a/src/code-stub-assembler.cc
|
| +++ b/src/code-stub-assembler.cc
|
| @@ -378,9 +378,7 @@ Node* CodeStubAssembler::AllocateRawUnaligned(Node* size_in_bytes,
|
| Node* no_runtime_result = top;
|
| StoreNoWriteBarrier(MachineType::PointerRepresentation(), top_address,
|
| new_top);
|
| - no_runtime_result = BitcastWordToTagged(
|
| - IntPtrAdd(no_runtime_result, IntPtrConstant(kHeapObjectTag)));
|
| - result.Bind(no_runtime_result);
|
| + result.Bind(BitcastWordToTagged(no_runtime_result));
|
| Goto(&merge_runtime);
|
|
|
| Bind(&merge_runtime);
|
| @@ -398,8 +396,9 @@ Node* CodeStubAssembler::AllocateRawAligned(Node* size_in_bytes,
|
| if (flags & kDoubleAlignment) {
|
| // TODO(epertoso): Simd128 alignment.
|
| Label aligned(this), not_aligned(this), merge(this, &adjusted_size);
|
| - Branch(WordAnd(top, IntPtrConstant(kDoubleAlignmentMask)), ¬_aligned,
|
| - &aligned);
|
| + Branch(WordAnd(IntPtrSub(top, IntPtrConstant(kHeapObjectTag)),
|
| + IntPtrConstant(kDoubleAlignmentMask)),
|
| + ¬_aligned, &aligned);
|
|
|
| Bind(¬_aligned);
|
| Node* not_aligned_size =
|
| @@ -425,7 +424,8 @@ Node* CodeStubAssembler::AllocateRawAligned(Node* size_in_bytes,
|
| // Store a filler and increase the address by kPointerSize.
|
| // TODO(epertoso): this code assumes that we only align to kDoubleSize. Change
|
| // it when Simd128 alignment is supported.
|
| - StoreNoWriteBarrier(MachineType::PointerRepresentation(), top,
|
| + StoreNoWriteBarrier(MachineType::PointerRepresentation(),
|
| + IntPtrSub(top, IntPtrConstant(1)),
|
| LoadRoot(Heap::kOnePointerFillerMapRootIndex));
|
| address.Bind(BitcastWordToTagged(
|
| IntPtrAdd(address.value(), IntPtrConstant(kPointerSize))));
|
|
|