Commit 13b97b62 authored by mvstanton's avatar mvstanton Committed by Commit bot

Calls to the CallIC miss handler looked up the receiver incorrectly.

On platforms that don't push the return address on the stack at time of call, there was an error.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/894753006

Cr-Commit-Position: refs/heads/master@{#26439}
parent 8c3a408e
......@@ -2789,8 +2789,8 @@ void CallICStub::Generate(MacroAssembler* masm) {
void CallICStub::GenerateMiss(MacroAssembler* masm) {
// Get the receiver of the function from the stack; 1 ~ return address.
__ ldr(r4, MemOperand(sp, (arg_count() + 1) * kPointerSize));
// Get the receiver of the function from the stack.
__ ldr(r4, MemOperand(sp, arg_count() * kPointerSize));
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
......
......@@ -3181,8 +3181,8 @@ void CallICStub::Generate(MacroAssembler* masm) {
void CallICStub::GenerateMiss(MacroAssembler* masm) {
ASM_LOCATION("CallICStub[Miss]");
// Get the receiver of the function from the stack; 1 ~ return address.
__ Peek(x4, (arg_count() + 1) * kPointerSize);
// Get the receiver of the function from the stack.
__ Peek(x4, arg_count() * kPointerSize);
{
FrameScope scope(masm, StackFrame::INTERNAL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment