Index: src/mips64/macro-assembler-mips64.cc |
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc |
index 97fac829c61af331bff490fa26eaa9255943c831..536c74f41b32741758a68397d44a32876bdcae4c 100644 |
--- a/src/mips64/macro-assembler-mips64.cc |
+++ b/src/mips64/macro-assembler-mips64.cc |
@@ -4318,11 +4318,11 @@ |
} |
// We can ignore DOUBLE_ALIGNMENT flags here because doubles and pointers have |
- // the same alignment on MIPS64. |
+ // the same alignment on ARM64. |
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment); |
if (emit_debug_code()) { |
- And(at, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(at, result, Operand(kDoubleAlignmentMask)); |
Check(eq, kAllocationIsNotDoubleAligned, at, Operand(zero_reg)); |
} |
@@ -4335,6 +4335,9 @@ |
// The top pointer is not updated for allocation folding dominators. |
sd(result_end, MemOperand(top_address)); |
} |
+ |
+ // Tag object. |
+ Daddu(result, result, Operand(kHeapObjectTag)); |
} |
@@ -4388,11 +4391,11 @@ |
} |
// We can ignore DOUBLE_ALIGNMENT flags here because doubles and pointers have |
- // the same alignment on MIPS64. |
+ // the same alignment on ARM64. |
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment); |
if (emit_debug_code()) { |
- And(at, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(at, result, Operand(kDoubleAlignmentMask)); |
Check(eq, kAllocationIsNotDoubleAligned, at, Operand(zero_reg)); |
} |
@@ -4410,13 +4413,16 @@ |
// Update allocation top. result temporarily holds the new top. |
if (emit_debug_code()) { |
And(at, result_end, Operand(kObjectAlignmentMask)); |
- Check(ne, kUnalignedAllocationInNewSpace, at, Operand(zero_reg)); |
+ Check(eq, kUnalignedAllocationInNewSpace, at, Operand(zero_reg)); |
} |
if ((flags & ALLOCATION_FOLDING_DOMINATOR) == 0) { |
// The top pointer is not updated for allocation folding dominators. |
sd(result_end, MemOperand(top_address)); |
} |
+ |
+ // Tag object if. |
+ Daddu(result, result, Operand(kHeapObjectTag)); |
} |
void MacroAssembler::FastAllocate(int object_size, Register result, |
@@ -4444,13 +4450,15 @@ |
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment); |
if (emit_debug_code()) { |
- And(at, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(at, result, Operand(kDoubleAlignmentMask)); |
Check(eq, kAllocationIsNotDoubleAligned, at, Operand(zero_reg)); |
} |
// Calculate new top and write it back. |
Daddu(result_end, result, Operand(object_size)); |
sd(result_end, MemOperand(top_address)); |
+ |
+ Daddu(result, result, Operand(kHeapObjectTag)); |
} |
void MacroAssembler::FastAllocate(Register object_size, Register result, |
@@ -4473,7 +4481,7 @@ |
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment); |
if (emit_debug_code()) { |
- And(at, result, Operand(kDoubleAlignmentMaskTagged)); |
+ And(at, result, Operand(kDoubleAlignmentMask)); |
Check(eq, kAllocationIsNotDoubleAligned, at, Operand(zero_reg)); |
} |
@@ -4487,8 +4495,10 @@ |
// Update allocation top. result temporarily holds the new top. |
if (emit_debug_code()) { |
And(at, result_end, Operand(kObjectAlignmentMask)); |
- Check(ne, kUnalignedAllocationInNewSpace, at, Operand(zero_reg)); |
- } |
+ Check(eq, kUnalignedAllocationInNewSpace, at, Operand(zero_reg)); |
+ } |
+ |
+ Daddu(result, result, Operand(kHeapObjectTag)); |
} |
void MacroAssembler::AllocateTwoByteString(Register result, |