Reviewers: akos.palfi.imgtec, balazs.kilvady, mvstanton, danno,
Description:
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=
Please review this at https://codereview.chromium.org/864713003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -4 lines):
M src/mips/code-stubs-mips.cc
M src/mips64/code-stubs-mips64.cc
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index
b7e75ec75a8ce5bed4f94255cd99de951a2af77e..55020a2aac5b3d673d108dc9e6e452f625353756
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);
Index: src/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc
b/src/mips64/code-stubs-mips64.cc
index
454d6fb4d57c0819eb7246313e9751cc5cc0e8c6..78af39c67b5bdee68709371716507390ce3941b5
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);
--
--
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/d/optout.