From nobody Wed Nov 5 17:28:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496796984015710.1716623518852; Tue, 6 Jun 2017 17:56:24 -0700 (PDT) Received: from localhost ([::1]:40662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIPGo-0000Ox-Nl for importer@patchew.org; Tue, 06 Jun 2017 20:56:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIOtP-0002t1-NJ for qemu-devel@nongnu.org; Tue, 06 Jun 2017 20:32:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIOtO-00024Y-Ti for qemu-devel@nongnu.org; Tue, 06 Jun 2017 20:32:11 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:33061) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dIOtO-00024R-PL for qemu-devel@nongnu.org; Tue, 06 Jun 2017 20:32:10 -0400 Received: by mail-qt0-x243.google.com with SMTP id w1so26596206qtg.0 for ; Tue, 06 Jun 2017 17:32:10 -0700 (PDT) Received: from bigtime.twiddle.net.com (71-217-91-69.tukw.qwest.net. [71.217.91.69]) by smtp.gmail.com with ESMTPSA id m47sm29286qtc.36.2017.06.06.17.32.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 17:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=aP3gO8c44OI7HApXhhF1pXFO+vtMjk7v6FgUhS1p3hY=; b=vZuuLoC5uAX+kfTUn0sUwe9OHRGoqCxKG6/0Q/jIJ59Rxi7CUaBV2y/7EVapRfzTvU e/ptHaGyGrbaSKmAbncS+Jm8ahUeLYS7w3uc6VDKv8slG7xJTzVIfQvFAE6L0YDEtXD0 3NJkwfQMaPGWE5mE1WCXpmAa/7EDWS+cHd4zmY3HHQOTmK5Kr495+qNVe0pNgDdCkKHd ex+OWUSO2Zl+kNdFYLhc41Wtb2v0N/X7TAJEBC4+0wX/XOdiASVtkraQUKNCy2nayGIP hNFmn0U8MnrQtbzkNKRnN7u1SAGOh1rjqxZgROMcn09y+4xP+gYkZPaXABWmGr1/129z /J5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=aP3gO8c44OI7HApXhhF1pXFO+vtMjk7v6FgUhS1p3hY=; b=NSYR477E/xw6wEyeK1dqc2PoEGnGTxv3FSqE5HP+/3VnPpZ5RMwyEWevrJ+qCAiqvl 18hCpV4M/uklAku84tc/Vaa2dnDV4z0h0cyBDF4gyUsa9TD0wCsRUKnCSoo+52kfkKhW 3XyLipdSTSxQFYv1gix0v19vQn3rSKtJLdyDaLpEF+nzRIVCL7UtX/wbKMf0RbvPPZ79 /epDpfyLw9lGwEI1gvU31sjE4O4mM+9JRktdU7L0/PoutjtIJx4DdCzulEEq0lOpo/IY VdSxG3ehY/zjbRiddB2w9vujx++Z3v0wLKzzLT+Ue6bKHcDtb1oLztFAj2Gn4uZ9Uq7b 5+QA== X-Gm-Message-State: AODbwcB4LKuIDBwNu1/6X1Y5orDyRE1XaEWT5uqZmo96BKrf9a/muYg7 uxGxA+egmPwaL1JYmm8= X-Received: by 10.200.53.51 with SMTP id y48mr24650155qtb.98.1496795530122; Tue, 06 Jun 2017 17:32:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 6 Jun 2017 17:30:44 -0700 Message-Id: <20170607003119.14778-36-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170607003119.14778-1-rth@twiddle.net> References: <20170607003119.14778-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PULL v2 35/70] target/s390x: Save current ilen during translation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Use this saved value instead of recomputing from next_pc difference. Reviewed-by: David Hildenbrand Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/translate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 737b577..5c7e5c1 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -58,6 +58,7 @@ struct DisasContext { const DisasInsn *insn; DisasFields *fields; uint64_t pc, next_pc; + uint32_t ilen; enum cc_op cc_op; bool singlestep_enabled; }; @@ -349,7 +350,7 @@ static void gen_program_exception(DisasContext *s, int = code) tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUS390XState, int_pgm_code)); tcg_temp_free_i32(tmp); =20 - tmp =3D tcg_const_i32(s->next_pc - s->pc); + tmp =3D tcg_const_i32(s->ilen); tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUS390XState, int_pgm_ilen)); tcg_temp_free_i32(tmp); =20 @@ -2212,7 +2213,7 @@ static ExitStatus op_ex(DisasContext *s, DisasOps *o) v1 =3D regs[r1]; } =20 - ilen =3D tcg_const_i32(s->next_pc - s->pc); + ilen =3D tcg_const_i32(s->ilen); gen_helper_ex(cpu_env, ilen, v1, o->in2); tcg_temp_free_i32(ilen); =20 @@ -4057,7 +4058,7 @@ static ExitStatus op_svc(DisasContext *s, DisasOps *o) tcg_gen_st_i32(t, cpu_env, offsetof(CPUS390XState, int_svc_code)); tcg_temp_free_i32(t); =20 - t =3D tcg_const_i32(s->next_pc - s->pc); + t =3D tcg_const_i32(s->ilen); tcg_gen_st_i32(t, cpu_env, offsetof(CPUS390XState, int_svc_ilen)); tcg_temp_free_i32(t); =20 @@ -5196,6 +5197,7 @@ static const DisasInsn *extract_insn(CPUS390XState *e= nv, DisasContext *s, op =3D (insn >> 8) & 0xff; ilen =3D get_ilen(op); s->next_pc =3D s->pc + ilen; + s->ilen =3D ilen; =20 switch (ilen) { case 2: --=20 2.9.4