Oops, not good.
The at register will be clobbered after jump is taken in long branch mode.
I suggest using same scratch register for smi check and map compare to
achieve same effect as it is on other arches.
Like this:
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
index 10813eb..7e116f2 100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -1472,7 +1472,9 @@ Handle<Code>
BaseLoadStoreStubCompiler::CompilePolymorphicIC(
Label number_case;
Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
- __ JumpIfSmi(receiver(), smi_target);
+
+ __ SmiTst(receiver(), scratch2());
+ __ Branch(smi_target, eq, scratch2(), Operand(zero_reg));
Register map_reg = scratch1();
@@ -1484,12 +1486,13 @@ Handle<Code>
BaseLoadStoreStubCompiler::CompilePolymorphicIC(
Handle<Map> map = IC::TypeToMap(*type, isolate());
if (!map->is_deprecated()) {
number_of_handled_maps++;
+ __ Subu(scratch2(), map_reg, Operand(map)); //Compare maps.
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, scratch2(), Operand(zero_reg));
}
}
ASSERT(number_of_handled_maps != 0);
https://codereview.chromium.org/171793005/
--
--
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.