Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 4a5a386fa0f7cbf09eb0324bad52521f127c74c0..399fb345ce2b6970be3143941c2077a200aba2f7 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3347,28 +3347,25 @@ void MacroAssembler::Allocate(int object_size, |
} |
-void MacroAssembler::Allocate(Register object_size, |
- Register result, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required, |
- AllocationFlags flags) { |
+void MacroAssembler::Allocate(Register object_size, Register result, |
+ Register result_end, Register scratch1, |
+ Label* gc_required, AllocationFlags flags) { |
if (!FLAG_inline_new) { |
if (emit_debug_code()) { |
// Trash the registers to simulate an allocation failure. |
li(result, 0x7091); |
li(scratch1, 0x7191); |
- li(scratch2, 0x7291); |
+ li(result_end, 0x7291); |
} |
jmp(gc_required); |
return; |
} |
DCHECK(!result.is(scratch1)); |
- DCHECK(!result.is(scratch2)); |
- DCHECK(!scratch1.is(scratch2)); |
+ DCHECK(!result.is(result_end)); |
+ DCHECK(!scratch1.is(result_end)); |
DCHECK(!object_size.is(t9)); |
- DCHECK(!scratch1.is(t9) && !scratch2.is(t9) && !result.is(t9)); |
+ DCHECK(!scratch1.is(t9) && !result_end.is(t9) && !result.is(t9)); |
// Check relative positions of allocation top and limit addresses. |
// ARM adds additional checks to make sure the ldm instruction can be |
@@ -3408,14 +3405,14 @@ void MacroAssembler::Allocate(Register 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(scratch2, result, Operand(kDoubleAlignmentMask)); |
+ And(result_end, result, Operand(kDoubleAlignmentMask)); |
Label aligned; |
- Branch(&aligned, eq, scratch2, Operand(zero_reg)); |
+ Branch(&aligned, eq, result_end, Operand(zero_reg)); |
if ((flags & PRETENURE) != 0) { |
Branch(gc_required, Ugreater_equal, result, Operand(t9)); |
} |
- li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); |
- sw(scratch2, MemOperand(result)); |
+ li(result_end, Operand(isolate()->factory()->one_pointer_filler_map())); |
+ sw(result_end, MemOperand(result)); |
Addu(result, result, Operand(kDoubleSize / 2)); |
bind(&aligned); |
} |
@@ -3424,19 +3421,19 @@ void MacroAssembler::Allocate(Register object_size, |
// to calculate the new top. Object size may be in words so a shift is |
// required to get the number of bytes. |
if ((flags & SIZE_IN_WORDS) != 0) { |
- sll(scratch2, object_size, kPointerSizeLog2); |
- Addu(scratch2, result, scratch2); |
+ sll(result_end, object_size, kPointerSizeLog2); |
+ Addu(result_end, result, result_end); |
} else { |
- Addu(scratch2, result, Operand(object_size)); |
+ Addu(result_end, result, Operand(object_size)); |
} |
- Branch(gc_required, Ugreater, scratch2, Operand(t9)); |
+ Branch(gc_required, Ugreater, result_end, Operand(t9)); |
// Update allocation top. result temporarily holds the new top. |
if (emit_debug_code()) { |
- And(t9, scratch2, Operand(kObjectAlignmentMask)); |
+ And(t9, result_end, Operand(kObjectAlignmentMask)); |
Check(eq, kUnalignedAllocationInNewSpace, t9, Operand(zero_reg)); |
} |
- sw(scratch2, MemOperand(topaddr)); |
+ sw(result_end, MemOperand(topaddr)); |
// Tag object if requested. |
if ((flags & TAG_OBJECT) != 0) { |
@@ -3706,16 +3703,16 @@ void MacroAssembler::CopyBytes(Register src, |
} |
-void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, |
- Register end_offset, |
+void MacroAssembler::InitializeFieldsWithFiller(Register current_address, |
+ Register end_address, |
Register filler) { |
Label loop, entry; |
Branch(&entry); |
bind(&loop); |
- sw(filler, MemOperand(start_offset)); |
- Addu(start_offset, start_offset, kPointerSize); |
+ sw(filler, MemOperand(current_address)); |
+ Addu(current_address, current_address, kPointerSize); |
bind(&entry); |
- Branch(&loop, ult, start_offset, Operand(end_offset)); |
+ Branch(&loop, ult, current_address, Operand(end_address)); |
} |