From patchwork Sun Dec 11 15:27:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 633091 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1994246pvb; Sun, 11 Dec 2022 07:36:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Jf3o4POKCBGsrm9qrmGepSMzhmT/5PnE0F8EyS2p0tvjn8wlJWQvrysR9y6URCYRUTpwu X-Received: by 2002:ac8:4b55:0:b0:3a5:7a7c:25bb with SMTP id e21-20020ac84b55000000b003a57a7c25bbmr15562695qts.27.1670772967657; Sun, 11 Dec 2022 07:36:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670772967; cv=none; d=google.com; s=arc-20160816; b=ZVeGkAFdEK5qVOaefQRt7MpWrmWK2dK+/r53xKY3VdUEeThBP1GA3pVFp0XJ+9njx5 rgicV1mtN1Yel4pTIRLoXBSquRQ5QQx5Y9pIizBwPB8YyLEIQD3VmFa5JDQiYoXLnsWy J9cNuL+CQxZ1v94fgf67kYKEZ5HKzNmQsfI0VVAr+xG6aX8ipEVl3YWeq5ipu88M/XaJ GB6dsvlGTPURka0qkhFZUctepgULBJs+6gq210CXYBvoKz3ugl6tLrnqtDMKupNS/1Of wtaTtD/bCxvKYWh6b+a4VMMWzEJUTCJ68fgF22GdeJps31y0WxZkyd00y3A7AwkbER9K a5mw== 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=0KchuaBzJWkMTjJsrbnSjZVRKRaS7lDJ8+obmeMmkCQ=; b=ntKMIJpW1tL1cqQlE9EX1AoscnRZv/sWVYTOdzaGdiaH3m2TnMrRzVrsPjmGXvkR6X mwVofpBXJ77Ex4AJbL5BYFfuiIYnjbXveyfIJjUjYX8pDb/SvVl04Xawf9nzkfU7RtEp pEdyvsM3GQA2jVY1IoKb4Flg5CsNhHAXPxvIqalgwkes/kHlK8iRH+YEf3eDruIKMMIu 4KrV4MKoWasWiPVUdONiZ9vAt1BtW0WM1kyAsVqvlsPSeVi9o7wvg93IeJsRsHLevJ16 jrqE9cLGngQ+HsPU86QlZL84BTbMUNuNATL1cs+72OuGMjmVMfrqV368W9x7GdfAOs4z 3B4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g+LqkYsg; 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 cm11-20020a05622a250b00b003a6568a38a5si4211681qtb.41.2022.12.11.07.36.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Dec 2022 07:36:07 -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=g+LqkYsg; 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 1p4OFm-0006Pl-NF; Sun, 11 Dec 2022 10:28:34 -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 1p4OFk-0006Lk-CU for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:32 -0500 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4OFf-0007Zb-Q7 for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:31 -0500 Received: by mail-oi1-x22c.google.com with SMTP id c129so9114650oia.0 for ; Sun, 11 Dec 2022 07:28:21 -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=0KchuaBzJWkMTjJsrbnSjZVRKRaS7lDJ8+obmeMmkCQ=; b=g+LqkYsgUDtCAlBppJgT4y4Gconq2Lt0FEREdxDXBCwmfQry6Zz0p+ge4Z5Pmdy3Kh dmg0cAxIFxAxV/d7HkMml4uz3dSIfZOMcGX64hhKlPyWj2N5u/cYCBfJV6pmimZe5Enc YaO7LvsRTAtXz/O46KUDigz7zcMxASLjh7/qBW58R7fm+dUNWhtqR4ZZWEFwQre8VdEB AFqt6Eov0v/oDGSTm+z1fv3A+iIO0DfATp0/Obj0R5n9n9gk5zJr0yuA70u2VVuSoo3y aaJoUFB9EQQVycRuD3lksJ9wIE8sxho3T7PF1HkQGW4xtVwCtf9xSQ2D7XqWWj7ZyAOR 6vYw== 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=0KchuaBzJWkMTjJsrbnSjZVRKRaS7lDJ8+obmeMmkCQ=; b=5tKaR5UaxVTE8DHlHL4AJB9YtQ2t7mxY9hpSuluJ3RyCFcwZyxTW24dzlU4hqaoNBp 7fuPcbYyJ6y+5wqNpeyAmJCSAEHy1TuEV8LXzEPTJQCNHne4ItdmdAc7E6kcQLE/dmbY qxtqLLmM97EnLWCrntKQ84pO6wuoBhtysz4jUIZ/3zQ9D3bqLVrVynaDUihCU+hX53/b j00MwYcF7PtEjNeDbjKpIbth3bk2VYsOvC7ZcnrdVhy7Q+uNWVsVS64ZfQZlcWMwr5Nt PsZjKiLjEsT0llinIyvJf8NnvGiAFv0cuFU7wmvFQEy7hdz4Kki59PJQARpaa03TzQTJ p0mQ== X-Gm-Message-State: ANoB5pkcv5adTHxGNMyACV1ZQ6LrZK9/avygZA9JzDHINrfBnbpkNzkG TVt2XypPsW3ztcjEl9bzf81Am5Nl0oOxaNFgbMw= X-Received: by 2002:a05:6808:13c1:b0:355:1de8:bc79 with SMTP id d1-20020a05680813c100b003551de8bc79mr7336829oiw.27.1670772500292; Sun, 11 Dec 2022 07:28:20 -0800 (PST) Received: from stoup.. ([2806:102e:18:2efc:7b4f:f28b:eca6:b583]) by smtp.gmail.com with ESMTPSA id q24-20020a056830233800b006708d2cd8bcsm938140otg.65.2022.12.11.07.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 07:28:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v2 13/27] target/s390x: Use ilen instead in branches Date: Sun, 11 Dec 2022 09:27:48 -0600 Message-Id: <20221211152802.923900-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221211152802.923900-1-richard.henderson@linaro.org> References: <20221211152802.923900-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22c.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: Ilya Leoshkevich Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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 96bd37426f..c9afa28c60 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); @@ -6253,7 +6247,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 @@ -6490,7 +6483,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; }