Commit f7df8a41 authored by akos.palfi@imgtec.com's avatar akos.palfi@imgtec.com

MIPS: Minor fixes to r22396

BUG=
R=akos.palfi@imgtec.com

Review URL: https://codereview.chromium.org/394913002

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 71bfbf49
...@@ -786,7 +786,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -786,7 +786,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
HeapObject::kMapOffset, HeapObject::kMapOffset,
target_map, target_map,
scratch2, scratch2,
kRAHasNotBeenSaved, kRAHasBeenSaved,
kDontSaveFPRegs, kDontSaveFPRegs,
OMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK); OMIT_SMI_CHECK);
...@@ -794,8 +794,9 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -794,8 +794,9 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
// Call into runtime if GC is required. // Call into runtime if GC is required.
__ bind(&gc_required); __ bind(&gc_required);
__ lw(ra, MemOperand(sp, 0));
__ Branch(USE_DELAY_SLOT, fail); __ Branch(USE_DELAY_SLOT, fail);
__ pop(ra); __ addiu(sp, sp, kPointerSize); // In delay slot.
// Convert and copy elements. // Convert and copy elements.
__ bind(&loop); __ bind(&loop);
...@@ -825,12 +826,12 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -825,12 +826,12 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
// exponent // exponent
__ sw(hole_upper, MemOperand(scratch3, Register::kExponentOffset)); __ sw(hole_upper, MemOperand(scratch3, Register::kExponentOffset));
__ bind(&entry); __ bind(&entry);
__ addiu(scratch3, scratch3, kDoubleSize); // In delay slot. __ addiu(scratch3, scratch3, kDoubleSize);
__ Branch(&loop, lt, scratch3, Operand(array_end)); __ Branch(&loop, lt, scratch3, Operand(array_end));
__ pop(ra);
__ bind(&done); __ bind(&done);
__ pop(ra);
} }
......
...@@ -661,17 +661,17 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -661,17 +661,17 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
__ SmiScale(array_end, length, kDoubleSizeLog2); __ SmiScale(array_end, length, kDoubleSizeLog2);
__ Daddu(array_end, array_end, scratch3); __ Daddu(array_end, array_end, scratch3);
// Repurpose registers no longer in use. // Repurpose registers no longer in use.
Register hole_lower = elements; Register hole_lower = elements;
Register hole_upper = length; Register hole_upper = length;
__ li(hole_lower, Operand(kHoleNanLower32)); __ li(hole_lower, Operand(kHoleNanLower32));
__ li(hole_upper, Operand(kHoleNanUpper32));
// scratch1: begin of source FixedArray element fields, not tagged // scratch1: begin of source FixedArray element fields, not tagged
// hole_lower: kHoleNanLower32 // hole_lower: kHoleNanLower32
// hole_upper: kHoleNanUpper32 // hole_upper: kHoleNanUpper32
// array_end: end of destination FixedDoubleArray, not tagged // array_end: end of destination FixedDoubleArray, not tagged
// scratch3: begin of FixedDoubleArray element fields, not tagged // scratch3: begin of FixedDoubleArray element fields, not tagged
__ Branch(&entry); __ Branch(USE_DELAY_SLOT, &entry);
__ li(hole_upper, Operand(kHoleNanUpper32)); // In delay slot.
__ bind(&only_change_map); __ bind(&only_change_map);
__ sd(target_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); __ sd(target_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
...@@ -679,7 +679,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -679,7 +679,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
HeapObject::kMapOffset, HeapObject::kMapOffset,
target_map, target_map,
scratch2, scratch2,
kRAHasNotBeenSaved, kRAHasBeenSaved,
kDontSaveFPRegs, kDontSaveFPRegs,
OMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK); OMIT_SMI_CHECK);
...@@ -687,8 +687,9 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -687,8 +687,9 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
// Call into runtime if GC is required. // Call into runtime if GC is required.
__ bind(&gc_required); __ bind(&gc_required);
__ pop(ra); __ ld(ra, MemOperand(sp, 0));
__ Branch(fail); __ Branch(USE_DELAY_SLOT, fail);
__ daddiu(sp, sp, kPointerSize); // In delay slot.
// Convert and copy elements. // Convert and copy elements.
__ bind(&loop); __ bind(&loop);
...@@ -702,9 +703,8 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -702,9 +703,8 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
__ mtc1(scratch2, f0); __ mtc1(scratch2, f0);
__ cvt_d_w(f0, f0); __ cvt_d_w(f0, f0);
__ sdc1(f0, MemOperand(scratch3)); __ sdc1(f0, MemOperand(scratch3));
__ Daddu(scratch3, scratch3, kDoubleSize); __ Branch(USE_DELAY_SLOT, &entry);
__ daddiu(scratch3, scratch3, kDoubleSize); // In delay slot.
__ Branch(&entry);
// Hole found, store the-hole NaN. // Hole found, store the-hole NaN.
__ bind(&convert_hole); __ bind(&convert_hole);
...@@ -723,8 +723,8 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( ...@@ -723,8 +723,8 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
__ bind(&entry); __ bind(&entry);
__ Branch(&loop, lt, scratch3, Operand(array_end)); __ Branch(&loop, lt, scratch3, Operand(array_end));
__ pop(ra);
__ bind(&done); __ bind(&done);
__ pop(ra);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment