From 7555761b9b03f1e8ea691212e17a640329a7ac41 Mon Sep 17 00:00:00 2001 From: Junliang Yan Date: Tue, 10 Nov 2020 09:53:39 -0500 Subject: [PATCH] PPC/s390: initialize argc register before calling interpreter Change-Id: I5cc99ac457d6d9e6317b5a910ad11c0543130e45 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2528900 Commit-Queue: Junliang Yan Reviewed-by: Milad Fa Cr-Commit-Position: refs/heads/master@{#71092} --- src/builtins/ppc/builtins-ppc.cc | 4 ++++ src/builtins/s390/builtins-s390.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/builtins/ppc/builtins-ppc.cc b/src/builtins/ppc/builtins-ppc.cc index 1deab315f0..efd65e2971 100644 --- a/src/builtins/ppc/builtins-ppc.cc +++ b/src/builtins/ppc/builtins-ppc.cc @@ -464,6 +464,10 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { // Resume (Ignition/TurboFan) generator object. { + __ LoadP(r3, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); + __ LoadHalfWord( + r3, + FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset)); // We abuse new.target both to indicate that this is a resume call and to // pass in the generator object. In ordinary calls, new.target is always // undefined because generator functions are non-constructable. diff --git a/src/builtins/s390/builtins-s390.cc b/src/builtins/s390/builtins-s390.cc index 0b11a6958d..8cc3a949c3 100644 --- a/src/builtins/s390/builtins-s390.cc +++ b/src/builtins/s390/builtins-s390.cc @@ -456,6 +456,10 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { // Resume (Ignition/TurboFan) generator object. { + __ LoadP(r2, FieldMemOperand(r6, JSFunction::kSharedFunctionInfoOffset)); + __ LoadHalfWordP( + r2, + FieldMemOperand(r2, SharedFunctionInfo::kFormalParameterCountOffset)); // We abuse new.target both to indicate that this is a resume call and to // pass in the generator object. In ordinary calls, new.target is always // undefined because generator functions are non-constructable.