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

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

Issue 2028633002: Provide a tagged allocation top pointer. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: WIP: adding a few tests. 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/mips/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index a58084cfbef4f76a98e8ce55691b7ba81ba77175..55f67309c8cfd5a8717e1381171954ccaf4990ca 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -4142,14 +4142,14 @@ void MacroAssembler::Allocate(int object_size,
// 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(kDoubleAlignmentMask));
+ And(result_end, result, Operand(kDoubleAlignmentMaskTagged));
Label aligned;
Branch(&aligned, eq, result_end, Operand(zero_reg));
if ((flags & PRETENURE) != 0) {
Branch(gc_required, Ugreater_equal, result, Operand(alloc_limit));
}
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- sw(result_end, MemOperand(result));
+ sw(result_end, FieldMemOperand(result, 0));
Addu(result, result, Operand(kDoubleSize / 2));
bind(&aligned);
}
@@ -4163,9 +4163,6 @@ void MacroAssembler::Allocate(int object_size,
// The top pointer is not updated for allocation folding dominators.
sw(result_end, MemOperand(top_address));
}
-
- // Tag object.
- Addu(result, result, Operand(kHeapObjectTag));
}
@@ -4225,14 +4222,14 @@ void MacroAssembler::Allocate(Register object_size, Register result,
// 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(kDoubleAlignmentMask));
+ And(result_end, result, Operand(kDoubleAlignmentMaskTagged));
Label aligned;
Branch(&aligned, eq, result_end, Operand(zero_reg));
if ((flags & PRETENURE) != 0) {
Branch(gc_required, Ugreater_equal, result, Operand(alloc_limit));
}
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- sw(result_end, MemOperand(result));
+ sw(result_end, FieldMemOperand(result, 0));
Addu(result, result, Operand(kDoubleSize / 2));
bind(&aligned);
}
@@ -4251,16 +4248,13 @@ void MacroAssembler::Allocate(Register object_size, Register result,
// Update allocation top. result temporarily holds the new top.
if (emit_debug_code()) {
And(alloc_limit, result_end, Operand(kObjectAlignmentMask));
- Check(eq, kUnalignedAllocationInNewSpace, alloc_limit, Operand(zero_reg));
+ Check(ne, kUnalignedAllocationInNewSpace, alloc_limit, Operand(zero_reg));
}
if ((flags & ALLOCATION_FOLDING_DOMINATOR) == 0) {
// The top pointer is not updated for allocation folding dominators.
sw(result_end, MemOperand(top_address));
}
-
- // Tag object.
- Addu(result, result, Operand(kHeapObjectTag));
}
void MacroAssembler::FastAllocate(int object_size, Register result,
@@ -4289,11 +4283,11 @@ void MacroAssembler::FastAllocate(int object_size, Register result,
// 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(kDoubleAlignmentMask));
+ And(result_end, result, Operand(kDoubleAlignmentMaskTagged));
Label aligned;
Branch(&aligned, eq, result_end, Operand(zero_reg));
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- sw(result_end, MemOperand(result));
+ sw(result_end, FieldMemOperand(result, 0));
Addu(result, result, Operand(kDoubleSize / 2));
bind(&aligned);
}
@@ -4302,8 +4296,6 @@ void MacroAssembler::FastAllocate(int object_size, Register result,
// The top pointer is not updated for allocation folding dominators.
sw(result_end, MemOperand(top_address));
-
- Addu(result, result, Operand(kHeapObjectTag));
}
void MacroAssembler::FastAllocate(Register object_size, Register result,
@@ -4328,11 +4320,11 @@ void MacroAssembler::FastAllocate(Register object_size, Register result,
// 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(kDoubleAlignmentMask));
+ And(result_end, result, Operand(kDoubleAlignmentMaskTagged));
Label aligned;
Branch(&aligned, eq, result_end, Operand(zero_reg));
li(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
- sw(result_end, MemOperand(result));
+ sw(result_end, FieldMemOperand(result, 0));
Addu(result, result, Operand(kDoubleSize / 2));
bind(&aligned);
}
@@ -4348,8 +4340,6 @@ void MacroAssembler::FastAllocate(Register object_size, Register result,
// The top pointer is not updated for allocation folding dominators.
sw(result_end, MemOperand(top_address));
-
- Addu(result, result, Operand(kHeapObjectTag));
}
void MacroAssembler::AllocateTwoByteString(Register result,
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698