Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: src/mips64/macro-assembler-mips64.cc

Issue 2035413003: Revert of Provide a tagged allocation top pointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698