Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index 610492f39126bf3819f88d3440c8aafe8595316a..27f39a7f1068e2006f26c5a42d0426687ea85c7c 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -375,7 +375,9 @@ |
Node* no_runtime_result = top; |
StoreNoWriteBarrier(MachineType::PointerRepresentation(), top_address, |
new_top); |
- result.Bind(BitcastWordToTagged(no_runtime_result)); |
+ no_runtime_result = BitcastWordToTagged( |
+ IntPtrAdd(no_runtime_result, IntPtrConstant(kHeapObjectTag))); |
+ result.Bind(no_runtime_result); |
Goto(&merge_runtime); |
Bind(&merge_runtime); |
@@ -393,9 +395,8 @@ |
if (flags & kDoubleAlignment) { |
// TODO(epertoso): Simd128 alignment. |
Label aligned(this), not_aligned(this), merge(this, &adjusted_size); |
- Branch(WordAnd(IntPtrSub(top, IntPtrConstant(kHeapObjectTag)), |
- IntPtrConstant(kDoubleAlignmentMask)), |
- ¬_aligned, &aligned); |
+ Branch(WordAnd(top, IntPtrConstant(kDoubleAlignmentMask)), ¬_aligned, |
+ &aligned); |
Bind(¬_aligned); |
Node* not_aligned_size = |
@@ -421,8 +422,7 @@ |
// 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(), |
- IntPtrSub(top, IntPtrConstant(1)), |
+ StoreNoWriteBarrier(MachineType::PointerRepresentation(), top, |
LoadRoot(Heap::kOnePointerFillerMapRootIndex)); |
address.Bind(BitcastWordToTagged( |
IntPtrAdd(address.value(), IntPtrConstant(kPointerSize)))); |