Commit 02c80dbf authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC/s390: [debug] Fix extra arguments when restarting frame

Port 94b294b3

Original Commit Message:

    Before the removal of the arguments adaptor frame, we could set {actual arguments count} = {formal parameter count} before restarting a live frame to avoid re-entering in the adaptor frame trampoline.
    This does not work anymore, since we now need the correct value of the {actual argument count} to be pushed in the callee frame to be used in its epilogue.

    This CL calls InvokeCall with the correct argument count and the kDontAdaptArgumentsSentinel to skip arguments adaptation.

R=victorgomes@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Idc7f712d1860192dc0306366ca77230ed8ad3455
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2693046Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72716}
parent a9b6f3f7
......@@ -35,13 +35,12 @@ void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) {
__ mr(fp, r4);
__ LoadP(r4, MemOperand(fp, StandardFrameConstants::kFunctionOffset));
__ LoadP(r3, MemOperand(fp, StandardFrameConstants::kArgCOffset));
__ LeaveFrame(StackFrame::INTERNAL);
__ LoadTaggedPointerField(
r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
__ lhz(r3,
FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset));
__ mr(r5, r3);
// The arguments are already in the stack (including any necessary padding),
// we should not try to massage the arguments again.
__ mov(r5, Operand(kDontAdaptArgumentsSentinel));
__ InvokeFunction(r4, r5, r3, JUMP_FUNCTION);
}
......
......@@ -37,13 +37,12 @@ void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) {
__ mov(fp, r3);
__ LoadU64(r3, MemOperand(fp, StandardFrameConstants::kFunctionOffset));
__ LoadU64(r2, MemOperand(fp, StandardFrameConstants::kArgCOffset));
__ LeaveFrame(StackFrame::INTERNAL);
__ LoadTaggedPointerField(
r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
__ LoadU16(
r2, FieldMemOperand(r2, SharedFunctionInfo::kFormalParameterCountOffset));
__ mov(r4, r2);
// The arguments are already in the stack (including any necessary padding),
// we should not try to massage the arguments again.
__ mov(r4, Operand(kDontAdaptArgumentsSentinel));
__ InvokeFunction(r3, r4, r2, JUMP_FUNCTION);
}
......
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