Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Unified Diff: src/mips/stub-cache-mips.cc

Issue 171793005: MIPS: Fix performance regression on sunspider string-unpack-code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use scratch register instead of at to handle long-branch case. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/stub-cache-mips.cc
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
index 7e3c801399c50243144061f1bbffda6a0e45339f..ef0775f20b48efe5728ab101727ecff4bb766b7c 100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -1442,10 +1442,11 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
}
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;
@@ -1455,12 +1456,15 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698