From patchwork Mon Jan 9 20:08:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 640693 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2340306pvb; Mon, 9 Jan 2023 12:22:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXvaUgmvEQ8hg+hBdx51bVJEd6EOOAug3ILcoV3trma+pyFFFad1Paks3V0Yg4JC8qgRoVBu X-Received: by 2002:a05:6214:c6c:b0:4c6:fcf7:9aea with SMTP id t12-20020a0562140c6c00b004c6fcf79aeamr120429482qvj.49.1673295767509; Mon, 09 Jan 2023 12:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673295767; cv=none; d=google.com; s=arc-20160816; b=KVHAlCpwxqB/vstky75pzbdw+teSgWNBRujxEF9GMtYRJqUhuNUaClbQfHgBLXjxd1 2/P2QuM1br3kRebRdqvQXCdwdFscAi8UfPvZ9R/iSAmxFz9Qdjk8/Ses78UxKxgHfrD1 2571nG+EeDe9TQgbSuvE09TVKE5SnJDTZeMJvspX96jY4mVfIQVYrC7u8JNfOWGOVxaS k6A1tvCuC3FEAnS7KCOx61p+CL4N220X4OS8jFZs7MPe0evvYQKtX75lMVKk5/7eB79p x6/Osie3hEcOblpb+D37ZqAlnyJIH7WqSza7Hz+oZitAcGrNybUnoibZvqZaMjhkVKjM NbWw== 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=LthcmYqoGylcnimKyPE4SUZ0KHnZX+uAbIpucCo0mYE=; b=fI877+g3FrvN6d/w87KV1AaAfisYoA6ss47QQRcyzUWu0ah7VZN3WqR77LVH3ZC2Qs 2barMvWpyeWi13U5NGif/KHINbpb+OhpfkSRT9HWfc5On1EUAw0IHdkMYN8BTg+al5TC hUR/EaX8hRvAuH0IWG548YDkLKOcHl2u2/NqfzijxsjqYyncQ2rzQJS1tT2Ci2O/b9zF vP+SyYJiAfkHfCJOmRhS7u7cXC52yuvAWjakZzW6LcuyeMpGVQJ8X0qqzgUY4V/8EKZB plaBc9oznb5RhGNM/Yzh7iiXGBeMZvSpTGYj/Ovy983HkniSE1BTM4/3mEBQkt1esqK2 unuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HnDKjEAb; 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 jv13-20020a05621429ed00b00531dea9a2f9si5161886qvb.76.2023.01.09.12.22.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 12:22:47 -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=HnDKjEAb; 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 1pEyRq-0003CC-6G; Mon, 09 Jan 2023 15:08:46 -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 1pEyRm-000346-3e for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:42 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEyRk-0007Yi-GQ for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:41 -0500 Received: by mail-pj1-x1030.google.com with SMTP id o1-20020a17090a678100b00219cf69e5f0so13994204pjj.2 for ; Mon, 09 Jan 2023 12:08:40 -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=LthcmYqoGylcnimKyPE4SUZ0KHnZX+uAbIpucCo0mYE=; b=HnDKjEAbDGsmyrHt3Gsu7ysr5yTMHLwT6t87tt7Atm6lIsMQZrHV0l1qVe5l3TVwbR +fuQDRtoP9ewLiThFtkItitugHGUyzo7csghfAsUO3gsUgtVUEGtqVB9Q2u2h6mHX4xu rtx9eizzSS3YWuWPQlEuSOo26u8xhZgi5P2XjVUgaX/xfFhJm5RPhLleqG+2vqFrD6RK fYbHU2eRIAOu63SB/TQkvVJkFdDmRSWRDUz7lFFaBv93SvitYLUd9dC1Q0f20QmCRVfC KlGbVlZM/WoxLiJMDiXy5kTTz5OKyKvEOdr2I3lgcyQenCVu1j8HoplPoSAfBDLYp/rl SMSg== 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=LthcmYqoGylcnimKyPE4SUZ0KHnZX+uAbIpucCo0mYE=; b=KUl1hl598SoFKSXJgB3UB/Wy8EJhw7JSGljV1l/n78YCyghxndlfmM9dvcfvSQBzDF RPvCHYCWq2gS/RkX8fBSpAeGDQct2712Yoha5tah9Vi6AIG/o6pkBq8Ai36DKZKtLcoF UahyMlcw2OQNt7BkqtDPhlun1D4cTGDYCHqUvdUHNgNzsOVWvp34UUSLhu6QYE/pvjRY JSOaaWtv64PSNYdUZQvJSFAQMfslG5z5OYCtWzYQ0jlgauFCT37yD/4Rn3D71fv7N0tQ /pw/TJM5YXMZWurvxUE7fdSA0ZEqo3k8H3zz5WWud6TudtZ/KbGCvKhiCBFUF8xwWJjj VUZA== X-Gm-Message-State: AFqh2koRIFeN/aZe6RTZkh003ps6TJNFB/nmp7LI6VIVSfZ0Df+fdeVj fuuByAqHRVUv9a1KXSNpDy9docabBJD9KWNL X-Received: by 2002:a17:90b:19cc:b0:226:cdcf:da83 with SMTP id nm12-20020a17090b19cc00b00226cdcfda83mr15747043pjb.46.1673294918825; Mon, 09 Jan 2023 12:08:38 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 12:08:38 -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 15/27] target/s390x: Add disp argument to update_psw_addr Date: Mon, 9 Jan 2023 12:08:07 -0800 Message-Id: <20230109200819.3916395-16-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::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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=unavailable 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 Rename to update_psw_addr_disp at the same time. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index de2d8edb47..56e1259dc6 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -336,9 +336,9 @@ static void return_low128(TCGv_i64 dest) tcg_gen_ld_i64(dest, cpu_env, offsetof(CPUS390XState, retxl)); } -static void update_psw_addr(DisasContext *s) +static void update_psw_addr_disp(DisasContext *s, int64_t disp) { - gen_psw_addr_disp(s, psw_addr, 0); + gen_psw_addr_disp(s, psw_addr, disp); } static void per_branch(DisasContext *s, bool to_next) @@ -444,7 +444,7 @@ static void gen_program_exception(DisasContext *s, int code) offsetof(CPUS390XState, int_pgm_ilen)); /* update the psw */ - update_psw_addr(s); + update_psw_addr_disp(s, 0); /* Save off cc. */ update_cc_op(s); @@ -1168,11 +1168,11 @@ static DisasJumpType help_goto_direct(DisasContext *s, int64_t disp) update_cc_op(s); per_breaking_event(s); tcg_gen_goto_tb(0); - gen_psw_addr_disp(s, psw_addr, disp); + update_psw_addr_disp(s, disp); tcg_gen_exit_tb(s->base.tb, 0); return DISAS_NORETURN; } else { - gen_psw_addr_disp(s, psw_addr, disp); + update_psw_addr_disp(s, disp); per_branch(s, false); return DISAS_PC_UPDATED; } @@ -2448,7 +2448,7 @@ static DisasJumpType op_ex(DisasContext *s, DisasOps *o) return DISAS_NORETURN; } - update_psw_addr(s); + update_psw_addr_disp(s, 0); update_cc_op(s); if (r1 == 0) { @@ -3175,7 +3175,7 @@ static DisasJumpType op_lpd(DisasContext *s, DisasOps *o) /* In a parallel context, stop the world and single step. */ if (tb_cflags(s->base.tb) & CF_PARALLEL) { - update_psw_addr(s); + update_psw_addr_disp(s, 0); update_cc_op(s); gen_exception(EXCP_ATOMIC); return DISAS_NORETURN; @@ -4492,7 +4492,7 @@ static DisasJumpType op_stura(DisasContext *s, DisasOps *o) tcg_gen_qemu_st_tl(o->in1, o->in2, MMU_REAL_IDX, s->insn->data); if (s->base.tb->flags & FLAG_MASK_PER) { - update_psw_addr(s); + update_psw_addr_disp(s, 0); gen_helper_per_store_real(cpu_env); } return DISAS_NEXT; @@ -4730,7 +4730,7 @@ static DisasJumpType op_svc(DisasContext *s, DisasOps *o) { TCGv_i32 t; - update_psw_addr(s); + update_psw_addr_disp(s, 0); update_cc_op(s); t = tcg_constant_i32(get_field(s, i1) & 0xff); @@ -6475,7 +6475,7 @@ static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s) if (s->base.tb->flags & FLAG_MASK_PER) { /* An exception might be triggered, save PSW if not already done. */ if (ret == DISAS_NEXT || ret == DISAS_TOO_MANY) { - gen_psw_addr_disp(s, psw_addr, s->ilen); + update_psw_addr_disp(s, s->ilen); } /* Call the helper to check for a possible PER exception. */ @@ -6544,7 +6544,7 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) case DISAS_NORETURN: break; case DISAS_TOO_MANY: - update_psw_addr(dc); + update_psw_addr_disp(dc, 0); /* FALLTHRU */ case DISAS_PC_UPDATED: /* Next TB starts off with CC_OP_DYNAMIC, so make sure the