Revision: 19500
Author:   [email protected]
Date:     Wed Feb 19 18:30:22 2014 UTC
Log:      MIPS: Fix performance regression on sunspider string-unpack-code.

Regression surfaced with r19009, but latent error was present since
r17767.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/171793005
http://code.google.com/p/v8/source/detail?r=19500

Modified:
 /branches/bleeding_edge/src/mips/stub-cache-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/stub-cache-mips.cc Wed Feb 19 09:24:44 2014 UTC +++ /branches/bleeding_edge/src/mips/stub-cache-mips.cc Wed Feb 19 18:30:22 2014 UTC
@@ -1439,10 +1439,11 @@
   }

   Label number_case;
+  Register match = scratch1();
   Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
-  __ JumpIfSmi(receiver(), smi_target);
+  __ JumpIfSmi(receiver(), smi_target, match);  // Reg match is 0 if Smi.

-  Register map_reg = scratch1();
+  Register map_reg = scratch2();

   int receiver_count = types->length();
   int number_of_handled_maps = 0;
@@ -1452,12 +1453,15 @@
     Handle<Map> map = IC::TypeToMap(*type, isolate());
     if (!map->is_deprecated()) {
       number_of_handled_maps++;
+      // Check map and tail call if there's a match.
+ // Separate compare from branch, to provide path for above JumpIfSmi().
+      __ Subu(match, map_reg, Operand(map));
       if (type->Is(HeapType::Number())) {
         ASSERT(!number_case.is_unused());
         __ bind(&number_case);
       }
       __ Jump(handlers->at(current), RelocInfo::CODE_TARGET,
-          eq, map_reg, Operand(map));
+          eq, match, Operand(zero_reg));
     }
   }
   ASSERT(number_of_handled_maps != 0);

--
--
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/groups/opt_out.

Reply via email to