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

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

Issue 1924223002: Provide 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/x64/code-stubs-x64.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 2efb5295974c8e061a579a1eb63f1a3ba0f4f8f5..3b48eb8ed6bdc25ab477d31830d602151e746f57 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -4816,7 +4816,7 @@ void MacroAssembler::MakeSureDoubleAlignedHelper(Register result,
AllocationFlags flags) {
if (kPointerSize == kDoubleSize) {
if (FLAG_debug_code) {
- testl(result, Immediate(kDoubleAlignmentMask));
+ testl(result, Immediate(kDoubleAlignmentMaskTagged));
Check(zero, kAllocationIsNotDoubleAligned);
}
} else {
@@ -4828,7 +4828,7 @@ void MacroAssembler::MakeSureDoubleAlignedHelper(Register result,
// used in UpdateAllocationTopHelper later.
DCHECK(!scratch.is(kScratchRegister));
Label aligned;
- testl(result, Immediate(kDoubleAlignmentMask));
+ testl(result, Immediate(kDoubleAlignmentMaskTagged));
j(zero, &aligned, Label::kNear);
if (((flags & ALLOCATION_FOLDED) == 0) && ((flags & PRETENURE) != 0)) {
ExternalReference allocation_limit =
@@ -4849,7 +4849,7 @@ void MacroAssembler::UpdateAllocationTopHelper(Register result_end,
AllocationFlags flags) {
if (emit_debug_code()) {
testp(result_end, Immediate(kObjectAlignmentMask));
- Check(zero, kUnalignedAllocationInNewSpace);
+ Check(not_zero, kUnalignedAllocationInNewSpace);
}
ExternalReference allocation_top =
@@ -4917,11 +4917,7 @@ void MacroAssembler::Allocate(int object_size,
}
if (top_reg.is(result)) {
- subp(result, Immediate(object_size - kHeapObjectTag));
- } else {
- // Tag the result.
- DCHECK(kHeapObjectTag == 1);
- incp(result);
+ subp(result, Immediate(object_size));
}
}
@@ -4986,9 +4982,6 @@ void MacroAssembler::Allocate(Register object_size,
// The top pointer is not updated for allocation folding dominators.
UpdateAllocationTopHelper(result_end, scratch, flags);
}
-
- // Tag the result.
- addp(result, Immediate(kHeapObjectTag));
}
void MacroAssembler::FastAllocate(int object_size, Register result,
@@ -5004,8 +4997,6 @@ void MacroAssembler::FastAllocate(int object_size, Register result,
leap(result_end, Operand(result, object_size));
UpdateAllocationTopHelper(result_end, no_reg, flags);
-
- addp(result, Immediate(kHeapObjectTag));
}
void MacroAssembler::FastAllocate(Register object_size, Register result,
@@ -5021,8 +5012,6 @@ void MacroAssembler::FastAllocate(Register object_size, Register result,
leap(result_end, Operand(result, object_size, times_1, 0));
UpdateAllocationTopHelper(result_end, no_reg, flags);
-
- addp(result, Immediate(kHeapObjectTag));
}
void MacroAssembler::AllocateHeapNumber(Register result,
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698