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

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

Issue 367053002: MIPS: KeyedLoadIC should have same register spec as LoadIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « src/mips/lithium-mips.cc ('k') | 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 e3d8fe14d939bac5a876a8cb580631acd97536ce..886210880027c4bd4893cc92f5c1adcc99e8788e 100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -1256,16 +1256,16 @@ Register* LoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
- static Register registers[] = { receiver, name, a3, a1, t0, t1 };
+ static Register registers[] = { receiver, name, a3, a0, t0, t1 };
return registers;
}
Register* KeyedLoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
- Register receiver = KeyedLoadIC::ReceiverRegister();
- Register name = KeyedLoadIC::NameRegister();
- static Register registers[] = { receiver, name, a2, a3, t0, t1 };
+ Register receiver = LoadIC::ReceiverRegister();
+ Register name = LoadIC::NameRegister();
+ static Register registers[] = { receiver, name, a3, a0, t0, t1 };
return registers;
}
@@ -1466,45 +1466,30 @@ Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
void KeyedLoadStubCompiler::GenerateLoadDictionaryElement(
MacroAssembler* masm) {
- // ---------- S t a t e --------------
- // -- ra : return address
- // -- a0 : key
- // -- a1 : receiver
- // -----------------------------------
- ASSERT(a1.is(KeyedLoadIC::ReceiverRegister()));
- ASSERT(a0.is(KeyedLoadIC::NameRegister()));
+ // The return address is in ra.
Label slow, miss;
- Register key = a0;
- Register receiver = a1;
+ Register key = LoadIC::NameRegister();
+ Register receiver = LoadIC::ReceiverRegister();
+ ASSERT(receiver.is(a1));
+ ASSERT(key.is(a2));
- __ JumpIfNotSmi(key, &miss);
+ __ UntagAndJumpIfNotSmi(t2, key, &miss);
__ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset));
- __ sra(a2, a0, kSmiTagSize);
- __ LoadFromNumberDictionary(&slow, t0, a0, v0, a2, a3, t1);
+ __ LoadFromNumberDictionary(&slow, t0, key, v0, t2, a3, t1);
__ Ret();
- // Slow case, key and receiver still in a0 and a1.
+ // Slow case, key and receiver still unmodified.
__ bind(&slow);
__ IncrementCounter(
masm->isolate()->counters()->keyed_load_external_array_slow(),
1, a2, a3);
- // Entry registers are intact.
- // ---------- S t a t e --------------
- // -- ra : return address
- // -- a0 : key
- // -- a1 : receiver
- // -----------------------------------
+
TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
// Miss case, call the runtime.
__ bind(&miss);
- // ---------- S t a t e --------------
- // -- ra : return address
- // -- a0 : key
- // -- a1 : receiver
- // -----------------------------------
TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
}
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698