From patchwork Mon Jan 9 20:08:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 640687 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2339252pvb; Mon, 9 Jan 2023 12:20:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXtNdV01JBIpIM/jxafqPCNIUxT/sKrbp6/xj+lGNdD14zkQpdfNmBVgeuXyGxSWygaEVAkL X-Received: by 2002:a05:622a:418b:b0:3a8:2f65:6ccb with SMTP id cd11-20020a05622a418b00b003a82f656ccbmr79657282qtb.65.1673295619963; Mon, 09 Jan 2023 12:20:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673295619; cv=none; d=google.com; s=arc-20160816; b=PI2uZMmLe5Ag6iQdBVnOfBH/foJvVFjzlSngan8RV35/UMtkBzKNJlUQbXdWYPpOi/ srotPlYAOKRynDWj0DFok7uG5sosj6biASr172K/EhLK/ut2ZQtoLj8EWK3PCYoU+/cu hAETdmpOzxgKM6cjzywDn9FJ5eVN8EcHiEzj7YN7kL87WoQRM2thd+EEno/Dmxw5TmwW kI7RZPo6AujC2tz0S/9HzHuu+Ryenz2pd3o5LRfojlAhNEyp/K/srVoZ2Z3dAGQX9zXo 1PKuR1pm0vYTyzqp7SMcERzdhh3MzaD9x2rP9ov8WTkVt3gChPd6hGCa3fREqY1VK6iK u68A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7YAEntzWlG5+v74Y9jfKjHpqon5dqwdjfhEi1TOWUto=; b=W9j3fsBJ3mJ9eFzxqljOFS4PdqojOAx2GHqqqAubUCcK3iHBeaoX6Y+nLyvPfSQzQz toxxs3GkQsHFwpOsrfdPvdBXS9xPJ8TI7C3rpZZ77twkLXyuiN9Ns5jpkfdAP3hLZctV DyLdsHJDXzxq/X69UUPEG1niD/aTL2UMvhDklqN4wqJlRe2i8hyHoRUKEpuDPANdu0qn mWN50e7LbFhmFfKgGsXbJHm8XsOawa6fSYl4sFFXMvymh/h7PZq0S7cOxICFp/uHF9nS AYDne91jVVXNhcBITG/zLffZexOCvqJE81eGMjNVMPKSkZDrA1esE3dzYXpUOanS/C2u 1d9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hc8QJAl0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z12-20020ac8454c000000b003a80ecd960csi4930417qtn.450.2023.01.09.12.20.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 12:20:19 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hc8QJAl0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEyRm-00033r-2L; Mon, 09 Jan 2023 15:08:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEyRj-00030n-H1 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:39 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEyRh-0007Qd-V6 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:39 -0500 Received: by mail-pj1-x102a.google.com with SMTP id z4-20020a17090a170400b00226d331390cso10941589pjd.5 for ; Mon, 09 Jan 2023 12:08:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7YAEntzWlG5+v74Y9jfKjHpqon5dqwdjfhEi1TOWUto=; b=Hc8QJAl0XuY1kmL0UhytuX31XJZkWQDjTvPB1O8s5e2E5H8Hmnx/W7a/xKMU4mr7kn k7jnHi3SLB4OKHlVJQJF1T1ILN5OcJB1o+uiuptwiUBDKIXtn3IcRqLsEPE3MqYHOF30 eDlCACbY6fiTfqqki4IMJWM2cd5NjBVGXANWWos2WBelzl1dC8+xtNjC8BuYuEgfQFfp 1CFFkm2VpIAeCHw+3z0fBaJAmMntgW6Ko5KzCCYvkRYr1aXdVGemDXDGjSWl06tflo1c bbtvv8QanM9nwRa4cnJVR4P9tQKmLxJqFX8l8jZXHVAQd5yDng6awodeMhEUUTvDf+lo Mw9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7YAEntzWlG5+v74Y9jfKjHpqon5dqwdjfhEi1TOWUto=; b=VV7Y+i4uV88HVEN7maOSKq5qKh7m8nnRe9gUvRfF4dqMycBNsoFS56YEmZVER0KwLK D4BvAsmAS55fEaEFk57cpqRq7L3eFsaahKkOkBLlzKW0y5DAUqS1w+Tv4r6UqmniQUAf lEbG/JBc7org1agQDlAmTJBKWLDx8n3AVmxU3g98ARPv8cclaAdDlLidC0wG7Z+t33q+ R3D1XagF8tmn2MnKSl0A3OVUnOWu5JOHmXyK0A1avY3GiwDZ00OsF2GOZ/jy+Ow6fBdD 1+L2v6nKIC7OuHTUcTKta/ZiBT0TXSb2baojsVUFUlczpeTmtz1Uq/4hbnxuvU++kuRW 0Xzw== X-Gm-Message-State: AFqh2kodGJ5DKOAl/SYdDy+sKfNM3Z2Psvse+rO/spgmbs0s+o4VLYgn vuy+HTEbWD6QgcenHwWRYEWP96yqI7eVhAyg X-Received: by 2002:a17:90a:9c15:b0:227:94f:9036 with SMTP id h21-20020a17090a9c1500b00227094f9036mr5756808pjp.22.1673294916600; Mon, 09 Jan 2023 12:08:36 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:158e:facf:7a46:ba9f]) by smtp.gmail.com with ESMTPSA id l2-20020a17090a384200b0022727d4af8dsm577574pjf.48.2023.01.09.12.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 12:08:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Ilya Leoshkevich Subject: [PATCH v3 13/27] target/s390x: Use ilen instead in branches Date: Mon, 9 Jan 2023 12:08:05 -0800 Message-Id: <20230109200819.3916395-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230109200819.3916395-1-richard.henderson@linaro.org> References: <20230109200819.3916395-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Remove the remaining uses of pc_tmp, and remove the variable. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 624bd18735..449e854c82 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -141,12 +141,6 @@ struct DisasContext { TCGOp *insn_start; DisasFields fields; uint64_t ex_value; - /* - * During translate_one(), pc_tmp is used to determine the instruction - * to be executed after base.pc_next - e.g. next sequential instruction - * or a branch target. - */ - uint64_t pc_tmp; uint32_t ilen; enum cc_op cc_op; bool exit_to_mainloop; @@ -1198,7 +1192,7 @@ static DisasJumpType help_branch(DisasContext *s, DisasCompare *c, goto egress; } if (is_imm) { - if (dest == s->pc_tmp) { + if (disp == s->ilen) { /* Branch to next. */ per_branch(s, true); ret = DISAS_NEXT; @@ -1222,7 +1216,7 @@ static DisasJumpType help_branch(DisasContext *s, DisasCompare *c, } } - if (use_goto_tb(s, s->pc_tmp)) { + if (use_goto_tb(s, s->base.pc_next + s->ilen)) { if (is_imm && use_goto_tb(s, dest)) { /* Both exits can use goto_tb. */ update_cc_op(s); @@ -6255,7 +6249,6 @@ static const DisasInsn *extract_insn(CPUS390XState *env, DisasContext *s) g_assert_not_reached(); } } - s->pc_tmp = s->base.pc_next + ilen; s->ilen = ilen; /* We can't actually determine the insn format until we've looked up @@ -6492,7 +6485,7 @@ static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s) out: /* Advance to the next instruction. */ - s->base.pc_next = s->pc_tmp; + s->base.pc_next += s->ilen; return ret; }