From 2ebb95071a2c261f99074a8d094231d0ce710c9f Mon Sep 17 00:00:00 2001 From: "palfia@homejinni.com" Date: Mon, 10 Jun 2013 18:10:58 +0000 Subject: [PATCH] MIPS: Fix LoadIC calling convention. Port r15027 (3ffb343) Original commit message: The comments in ic-arm.cc::LoadIC indicated that the receiver should be both in a register and on the stack. This isn't true in fact: the code is careful to spill the receiver if needed. This CL also fixes up a mistaken use of this convention in VisitYield. BUG= Review URL: https://codereview.chromium.org/16131004 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/full-codegen-mips.cc | 6 ------ src/mips/ic-mips.cc | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 10afeb1..a818733 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -2049,12 +2049,10 @@ void FullCodeGenerator::VisitYield(Yield* expr) { __ push(a3); // iter __ push(a0); // exception __ mov(a0, a3); // iter - __ push(a0); // push LoadIC state __ LoadRoot(a2, Heap::kthrow_stringRootIndex); // "throw" Handle throw_ic = isolate()->builtins()->LoadIC_Initialize(); CallIC(throw_ic); // iter.throw in a0 __ mov(a0, v0); - __ Addu(sp, sp, Operand(kPointerSize)); // drop LoadIC state __ jmp(&l_call); // try { received = yield result.value } @@ -2082,12 +2080,10 @@ void FullCodeGenerator::VisitYield(Yield* expr) { __ push(a3); // iter __ push(a0); // received __ mov(a0, a3); // iter - __ push(a0); // push LoadIC state __ LoadRoot(a2, Heap::ksend_stringRootIndex); // "send" Handle send_ic = isolate()->builtins()->LoadIC_Initialize(); CallIC(send_ic); // iter.send in a0 __ mov(a0, v0); - __ Addu(sp, sp, Operand(kPointerSize)); // drop LoadIC state // result = f.call(receiver, arg); __ bind(&l_call); @@ -2117,11 +2113,9 @@ void FullCodeGenerator::VisitYield(Yield* expr) { __ pop(a1); // result __ push(a0); // result.value __ mov(a0, a1); // result - __ push(a0); // push LoadIC state __ LoadRoot(a2, Heap::kdone_stringRootIndex); // "done" Handle done_ic = isolate()->builtins()->LoadIC_Initialize(); CallIC(done_ic); // result.done in v0 - __ Addu(sp, sp, Operand(kPointerSize)); // drop LoadIC state __ mov(a0, v0); Handle bool_ic = ToBooleanStub::GetUninitialized(isolate()); CallIC(bool_ic); diff --git a/src/mips/ic-mips.cc b/src/mips/ic-mips.cc index a4dc9e4..c1b4e1e 100644 --- a/src/mips/ic-mips.cc +++ b/src/mips/ic-mips.cc @@ -651,7 +651,6 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { // -- a2 : name // -- ra : return address // -- a0 : receiver - // -- sp[0] : receiver // ----------------------------------- // Probe the stub cache. @@ -671,7 +670,6 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) { // -- a2 : name // -- lr : return address // -- a0 : receiver - // -- sp[0] : receiver // ----------------------------------- Label miss; @@ -692,7 +690,6 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { // -- a2 : name // -- ra : return address // -- a0 : receiver - // -- sp[0] : receiver // ----------------------------------- Isolate* isolate = masm->isolate(); @@ -712,7 +709,6 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // -- a2 : name // -- ra : return address // -- a0 : receiver - // -- sp[0] : receiver // ----------------------------------- __ mov(a3, a0); -- 2.7.4