Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index d095b3ae9b6f5b83596dd6b0f364b47e21c8f80a..803313ad8d6150f8c31c12796c95330abc89dd77 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -4817,7 +4817,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 { |
@@ -4829,7 +4829,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 = |
@@ -4838,7 +4838,7 @@ void MacroAssembler::MakeSureDoubleAlignedHelper(Register result, |
j(above_equal, gc_required); |
} |
LoadRoot(kScratchRegister, Heap::kOnePointerFillerMapRootIndex); |
- movp(Operand(result, 0), kScratchRegister); |
+ movp(Operand(result, -kHeapObjectTag), kScratchRegister); |
addp(result, Immediate(kDoubleSize / 2)); |
bind(&aligned); |
} |
@@ -4850,7 +4850,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 = |
@@ -4918,11 +4918,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)); |
} |
} |
@@ -4987,9 +4983,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, |
@@ -5005,8 +4998,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, |
@@ -5022,8 +5013,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, |