Reviewers: ulan,
Message:
Hi Ulan, PTAL, thx!
Description:
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.
[email protected]
Please review this at https://codereview.chromium.org/894753006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -4 lines):
M src/arm/code-stubs-arm.cc
M src/arm64/code-stubs-arm64.cc
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index
c9c8ac7d30d031d250dcd366d5e6c38caec2dc83..bba29f69b703d1fc050f91c58459278c80108a03
100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -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);
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index
5ccf0de5bfe40acb57441dead8917c7623d993c7..8e5fa8a35437e2aa9cbfc9b31541ab4702db2ef9
100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -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);
--
--
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.