From fdce3e6f2f36cd7f92701c2f54a5f82d25e486c1 Mon Sep 17 00:00:00 2001 From: "paul.lind" Date: Wed, 4 Feb 2015 13:27:34 -0800 Subject: [PATCH] MIPS: Calls to the CallIC miss handler looked up the receiver incorrectly. Port 13b97b6214d8448c568d2e547e4a04c5fb468f5d Original commit message: On platforms that don't push the return address on the stack at time of call, there was an error. BUG= Review URL: https://codereview.chromium.org/864713003 Cr-Commit-Position: refs/heads/master@{#26443} --- src/mips/code-stubs-mips.cc | 4 ++-- src/mips64/code-stubs-mips64.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index b7e75ec..55020a2 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -2928,8 +2928,8 @@ void CallICStub::Generate(MacroAssembler* masm) { void CallICStub::GenerateMiss(MacroAssembler* masm) { - // Get the receiver of the function from the stack; 1 ~ return address. - __ lw(t0, MemOperand(sp, (arg_count() + 1) * kPointerSize)); + // Get the receiver of the function from the stack. + __ lw(t0, MemOperand(sp, arg_count() * kPointerSize)); { FrameScope scope(masm, StackFrame::INTERNAL); diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc index 454d6fb..78af39c 100644 --- a/src/mips64/code-stubs-mips64.cc +++ b/src/mips64/code-stubs-mips64.cc @@ -3003,8 +3003,8 @@ void CallICStub::Generate(MacroAssembler* masm) { void CallICStub::GenerateMiss(MacroAssembler* masm) { - // Get the receiver of the function from the stack; 1 ~ return address. - __ ld(a4, MemOperand(sp, (arg_count() + 1) * kPointerSize)); + // Get the receiver of the function from the stack. + __ ld(a4, MemOperand(sp, arg_count() * kPointerSize)); { FrameScope scope(masm, StackFrame::INTERNAL); -- 2.7.4