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

Unified Diff: src/mips64/macro-assembler-mips64.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/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 f409c0fb49a564d862437213a8fd3ad62cf92947..f8dfa1b0e819175fe91933806314e376e9cd39b9 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -4318,11 +4318,11 @@ void MacroAssembler::Allocate(int object_size,
}
// We can ignore DOUBLE_ALIGNMENT flags here because doubles and pointers have
- // the same alignment on ARM64.
+ // the same alignment on MIPS64.
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment);
if (emit_debug_code()) {
- And(at, result, Operand(kDoubleAlignmentMask));
+ And(at, result, Operand(kDoubleAlignmentMaskTagged));
Check(eq, kAllocationIsNotDoubleAligned, at, Operand(zero_reg));
}
@@ -4335,9 +4335,6 @@ void MacroAssembler::Allocate(int object_size,
// The top pointer is not updated for allocation folding dominators.
sd(result_end, MemOperand(top_address));
}
-
- // Tag object.
- Daddu(result, result, Operand(kHeapObjectTag));
}
@@ -4391,11 +4388,11 @@ void MacroAssembler::Allocate(Register object_size, Register result,
}
// We can ignore DOUBLE_ALIGNMENT flags here because doubles and pointers have
- // the same alignment on ARM64.
+ // the same alignment on MIPS64.
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment);
if (emit_debug_code()) {
- And(at, result, Operand(kDoubleAlignmentMask));
+ And(at, result, Operand(kDoubleAlignmentMaskTagged));
Check(eq, kAllocationIsNotDoubleAligned, at, Operand(zero_reg));
}
@@ -4412,7 +4409,7 @@ void MacroAssembler::Allocate(Register object_size, Register result,
// Update allocation top. result temporarily holds the new top.
if (emit_debug_code()) {
- And(at, result_end, Operand(kObjectAlignmentMask));
+ And(at, result_end, Operand(kObjectAlignmentMask - 1));
Check(eq, kUnalignedAllocationInNewSpace, at, Operand(zero_reg));
}
@@ -4420,9 +4417,6 @@ void MacroAssembler::Allocate(Register object_size, Register result,
// 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,
@@ -4450,15 +4444,13 @@ void MacroAssembler::FastAllocate(int object_size, Register result,
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment);
if (emit_debug_code()) {
- And(at, result, Operand(kDoubleAlignmentMask));
+ And(at, result, Operand(kDoubleAlignmentMaskTagged));
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,
@@ -4481,7 +4473,7 @@ void MacroAssembler::FastAllocate(Register object_size, Register result,
STATIC_ASSERT(kPointerAlignment == kDoubleAlignment);
if (emit_debug_code()) {
- And(at, result, Operand(kDoubleAlignmentMask));
+ And(at, result, Operand(kDoubleAlignmentMaskTagged));
Check(eq, kAllocationIsNotDoubleAligned, at, Operand(zero_reg));
}
@@ -4494,11 +4486,9 @@ void MacroAssembler::FastAllocate(Register object_size, Register result,
// Update allocation top. result temporarily holds the new top.
if (emit_debug_code()) {
- And(at, result_end, Operand(kObjectAlignmentMask));
+ And(at, result_end, Operand(kObjectAlignmentMask - 1));
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