Revision: 22413
Author:   [email protected]
Date:     Tue Jul 15 19:03:13 2014 UTC
Log:      MIPS: Minor fixes to r22396

BUG=
[email protected]

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

Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=22413

Modified:
 /branches/bleeding_edge/src/mips/codegen-mips.cc
 /branches/bleeding_edge/src/mips64/codegen-mips64.cc

=======================================
--- /branches/bleeding_edge/src/mips/codegen-mips.cc Tue Jul 15 08:38:16 2014 UTC +++ /branches/bleeding_edge/src/mips/codegen-mips.cc Tue Jul 15 19:03:13 2014 UTC
@@ -786,7 +786,7 @@
                       HeapObject::kMapOffset,
                       target_map,
                       scratch2,
-                      kRAHasNotBeenSaved,
+                      kRAHasBeenSaved,
                       kDontSaveFPRegs,
                       OMIT_REMEMBERED_SET,
                       OMIT_SMI_CHECK);
@@ -794,8 +794,9 @@

   // Call into runtime if GC is required.
   __ bind(&gc_required);
+  __ lw(ra, MemOperand(sp, 0));
   __ Branch(USE_DELAY_SLOT, fail);
-  __ pop(ra);
+  __ addiu(sp, sp, kPointerSize);  // In delay slot.

   // Convert and copy elements.
   __ bind(&loop);
@@ -825,12 +826,12 @@
   // exponent
   __ sw(hole_upper, MemOperand(scratch3, Register::kExponentOffset));
   __ bind(&entry);
-  __ addiu(scratch3, scratch3, kDoubleSize);  // In delay slot.
+  __ addiu(scratch3, scratch3, kDoubleSize);

   __ Branch(&loop, lt, scratch3, Operand(array_end));

+  __ bind(&done);
   __ pop(ra);
-  __ bind(&done);
 }


=======================================
--- /branches/bleeding_edge/src/mips64/codegen-mips64.cc Tue Jul 15 08:38:16 2014 UTC +++ /branches/bleeding_edge/src/mips64/codegen-mips64.cc Tue Jul 15 19:03:13 2014 UTC
@@ -661,17 +661,17 @@
   __ SmiScale(array_end, length, kDoubleSizeLog2);
   __ Daddu(array_end, array_end, scratch3);

-// Repurpose registers no longer in use.
+  // Repurpose registers no longer in use.
   Register hole_lower = elements;
   Register hole_upper = length;
   __ li(hole_lower, Operand(kHoleNanLower32));
-  __ li(hole_upper, Operand(kHoleNanUpper32));
   // scratch1: begin of source FixedArray element fields, not tagged
   // hole_lower: kHoleNanLower32
   // hole_upper: kHoleNanUpper32
   // array_end: end of destination FixedDoubleArray, 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);
   __ sd(target_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
@@ -679,7 +679,7 @@
                       HeapObject::kMapOffset,
                       target_map,
                       scratch2,
-                      kRAHasNotBeenSaved,
+                      kRAHasBeenSaved,
                       kDontSaveFPRegs,
                       OMIT_REMEMBERED_SET,
                       OMIT_SMI_CHECK);
@@ -687,8 +687,9 @@

   // Call into runtime if GC is required.
   __ bind(&gc_required);
-  __ pop(ra);
-  __ Branch(fail);
+  __ ld(ra, MemOperand(sp, 0));
+  __ Branch(USE_DELAY_SLOT, fail);
+  __ daddiu(sp, sp, kPointerSize);  // In delay slot.

   // Convert and copy elements.
   __ bind(&loop);
@@ -702,9 +703,8 @@
   __ mtc1(scratch2, f0);
   __ cvt_d_w(f0, f0);
   __ sdc1(f0, MemOperand(scratch3));
-  __ Daddu(scratch3, scratch3, kDoubleSize);
-
-  __ Branch(&entry);
+  __ Branch(USE_DELAY_SLOT, &entry);
+  __ daddiu(scratch3, scratch3, kDoubleSize);  // In delay slot.

   // Hole found, store the-hole NaN.
   __ bind(&convert_hole);
@@ -723,8 +723,8 @@
   __ bind(&entry);
   __ Branch(&loop, lt, scratch3, Operand(array_end));

+  __ bind(&done);
   __ pop(ra);
-  __ bind(&done);
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to