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

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

Issue 2031493002: Revert of Provide a tagged allocation top pointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index 182dca0ff0732eef57af1382fd54068f3f839ea1..114a7a0026b2883b2d49d17c514f178e5ddb7236 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -2009,7 +2009,7 @@
// Align the next allocation. Storing the filler map without checking top is
// safe in new-space because the limit of the heap is aligned there.
STATIC_ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
- and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
+ and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
Label aligned;
b(eq, &aligned);
if ((flags & PRETENURE) != 0) {
@@ -2017,8 +2017,7 @@
b(hs, gc_required);
}
mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- str(result_end, MemOperand(result, -kHeapObjectTag));
- add(result_end, result_end, Operand(kDoubleSize / 2));
+ str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
bind(&aligned);
}
@@ -2051,6 +2050,9 @@
// The top pointer is not updated for allocation folding dominators.
str(result_end, MemOperand(top_address));
}
+
+ // Tag object.
+ add(result, result, Operand(kHeapObjectTag));
}
@@ -2113,7 +2115,7 @@
// Align the next allocation. Storing the filler map without checking top is
// safe in new-space because the limit of the heap is aligned there.
DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
- and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
+ and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
Label aligned;
b(eq, &aligned);
if ((flags & PRETENURE) != 0) {
@@ -2121,8 +2123,7 @@
b(hs, gc_required);
}
mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- str(result_end, MemOperand(result, -kHeapObjectTag));
- add(result_end, result_end, Operand(kDoubleSize / 2));
+ str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
bind(&aligned);
}
@@ -2141,12 +2142,15 @@
// Update allocation top. result temporarily holds the new top.
if (emit_debug_code()) {
tst(result_end, Operand(kObjectAlignmentMask));
- Check(ne, kUnalignedAllocationInNewSpace);
+ Check(eq, kUnalignedAllocationInNewSpace);
}
if ((flags & ALLOCATION_FOLDING_DOMINATOR) == 0) {
// The top pointer is not updated for allocation folding dominators.
str(result_end, MemOperand(top_address));
}
+
+ // Tag object.
+ add(result, result, Operand(kHeapObjectTag));
}
void MacroAssembler::FastAllocate(Register object_size, Register result,
@@ -2169,12 +2173,11 @@
// Align the next allocation. Storing the filler map without checking top is
// safe in new-space because the limit of the heap is aligned there.
DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
- and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
+ and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
Label aligned;
b(eq, &aligned);
mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- str(result_end, MemOperand(result, -kHeapObjectTag));
- add(result_end, result_end, Operand(kDoubleSize / 2));
+ str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
bind(&aligned);
}
@@ -2189,10 +2192,12 @@
// Update allocation top. result temporarily holds the new top.
if (emit_debug_code()) {
tst(result_end, Operand(kObjectAlignmentMask));
- Check(ne, kUnalignedAllocationInNewSpace);
+ Check(eq, kUnalignedAllocationInNewSpace);
}
// The top pointer is not updated for allocation folding dominators.
str(result_end, MemOperand(top_address));
+
+ add(result, result, Operand(kHeapObjectTag));
}
void MacroAssembler::FastAllocate(int object_size, Register result,
@@ -2220,12 +2225,11 @@
// Align the next allocation. Storing the filler map without checking top is
// safe in new-space because the limit of the heap is aligned there.
STATIC_ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
- and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
+ and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
Label aligned;
b(eq, &aligned);
mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- str(result_end, MemOperand(result, -kHeapObjectTag));
- add(result_end, result_end, Operand(kDoubleSize / 2));
+ str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
bind(&aligned);
}
@@ -2253,6 +2257,8 @@
// The top pointer is not updated for allocation folding dominators.
str(result_end, MemOperand(top_address));
+
+ add(result, result, Operand(kHeapObjectTag));
}
void MacroAssembler::AllocateTwoByteString(Register result,
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698