From patchwork Mon Feb 20 18:40:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 655124 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1553238wrc; Mon, 20 Feb 2023 10:47:48 -0800 (PST) X-Google-Smtp-Source: AK7set9l0ZtOX4BK14TbKN8ZLdiU4NMVl2BbVT4H0hjeii+j10xu0upBaEcxN9k00sy+iQNb62WR X-Received: by 2002:ad4:5d65:0:b0:537:4b09:670f with SMTP id fn5-20020ad45d65000000b005374b09670fmr5229065qvb.25.1676918867657; Mon, 20 Feb 2023 10:47:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676918867; cv=none; d=google.com; s=arc-20160816; b=T2CT6Q3Q9b+eQnUVVuCEVAv1j8QlvD6bPXXFw1hmS8JU28mvAdJ3QdFjH1CacGyvJS rCLuVHQNDoyyycqVKivKITpKWNrA8QUyh8UIHDW+AGbKsfzqHe70co8rzWv61M2Vlvhc VjtGL4uI1sZqJib5tKpLeS38yTuBK6qSW8DpZOKMqjOiEKK5wfKgm0VJyeZf3RxTNYl7 hj0ZE+iOin26S4QgP1TOYcg62tcEG2jZZoG8hf32FcyqVkvRgcF7L/oIqKAXYRk7s79o SzOn5C1EoYpFlgZ6acbrJrmGSOxlGFg6PyYgBxJHH+QdwC+z9JtFFtZqIPiwFiZ0tm0E tWjQ== 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=yGToGuwwYtvWTL4/oWkEUIL2elnwxjyqoTAnw+xRj6w=; b=SMoXPB0Hw4W+V24WqnUxF1bnB3rAqLVzPsy5ZuJ1OUqqjeB8FCN8nOoD2xHywDTyw1 5BEwD4VYzlK5N7j9tV4nE7ITudsVoZ1nGuPl/PaxrAwQQuQg134OGVvvVWreXKvOyM5X 97eIbHzMljirLAkevVTHjWSoq8QdzZ3quBQnTeKtS5AFhuW4w2kk+pPpyQiasWBgpFQo eys9+syAnztFNLGRftlHawjq6klUMtuvcc3xAJZAZ3dwkfK5IVQL+nANoG50QroKxdMs asQLBm7rMrb9MMbMoA0YyD0ZeqgYjDuPaCHHCXTdLdOAHvCcr6YUfQaVpD41B2bl6Vmx vy7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EIu/snbx"; 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 y15-20020a0c8ecf000000b004bb60c76ffcsi2713913qvb.189.2023.02.20.10.47.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 10:47: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="EIu/snbx"; 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 1pUB8f-0008PP-EX; Mon, 20 Feb 2023 13:43:49 -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 1pUB6g-0004fT-Cl for qemu-devel@nongnu.org; Mon, 20 Feb 2023 13:41:49 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUB6b-00045u-SU for qemu-devel@nongnu.org; Mon, 20 Feb 2023 13:41:44 -0500 Received: by mail-pj1-x102d.google.com with SMTP id il18-20020a17090b165200b0023127b2d602so2372672pjb.2 for ; Mon, 20 Feb 2023 10:41:36 -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=yGToGuwwYtvWTL4/oWkEUIL2elnwxjyqoTAnw+xRj6w=; b=EIu/snbx4VRgsF4sbaczRTcA5TX3pI0SzQqYznmdjkTiFppO5KkrYU+v6lbUYHcsgN HAXlsTcAvZvJFhd36qSz1XYkdmNo7BYL54aA+yC9N5S4vQBo64FqHNhtSuFoI3qERvHg OCbsgkBYWwirwC0CuU8nMABrfTC5fLGCRoP/17UFVuIxVlq1/gIx914ChU/5iAiXfNBw e7qtdoGE2+0tjTa5EkZTRoGnc/AJH5HkG/N5WXHD/WeXOW3r64PlbpIgmW3CosoZkUyc MTWxGJ5fh8kxyqdElc8DmZddZfa1lVfyOcm1rb6N8+ToTsF+8IHMXWXcE/OsyWHDNk+d 7QAw== 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=yGToGuwwYtvWTL4/oWkEUIL2elnwxjyqoTAnw+xRj6w=; b=j2Fyb7OLjRz+S4c1SIAkH0/OTK7WtlfC42t0XkfzE0t2yb3YhGRIOyW//yb3GidVOA Lai1sNmyD4+7nS08XuFvXC/yj66zBP6Vp1kbCqYeWBzmFaAVcX9fLvHLyEW05U06o/jp RajGm5jfZcKIIQmkBfLwBQB3oFmypIji5l2UGzPWoor3zrqmq2vSKZFCkeiJpAg7ecPh lvf8BPncMM/escFzFagXBzLlwB8MX1Z1rUU8ZlXGcnPe17zFIZAQUAqu/9ROO7C3bSXK jyHMB4mi76KCj0/WM4tGMGllImyezgXHkxpxKSZ1i5Oo4+w1/0ZqeJnX1bVh2DrGzAOp 4n4w== X-Gm-Message-State: AO0yUKXahdLYKMbCjDbKtYVMxDVy/+ApW3R52fJrOqaDex4j20L9dN/c D/LbUZ2hbGr/+rlUci1IsX5ZGKDrekVAZ5dEKx0= X-Received: by 2002:a17:903:234b:b0:19a:7f4b:3ef6 with SMTP id c11-20020a170903234b00b0019a7f4b3ef6mr3240792plh.3.1676918496245; Mon, 20 Feb 2023 10:41:36 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id jk20-20020a170903331400b0019258bcf3ffsm1911676plb.56.2023.02.20.10.41.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:41:35 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: thuth@redhat.com, qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v4 22/27] target/s390x: Split per_breaking_event from per_branch_* Date: Mon, 20 Feb 2023 08:40:47 -1000 Message-Id: <20230220184052.163465-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230220184052.163465-1-richard.henderson@linaro.org> References: <20230220184052.163465-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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 This allows us to update gbea before other updates to psw_addr, which will be important for TARGET_TB_PCREL. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 4e39cf1646..8fbbbf8bbd 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -365,7 +365,6 @@ static inline bool per_enabled(DisasContext *s) static void per_branch_dest(DisasContext *s, TCGv_i64 dest) { #ifndef CONFIG_USER_ONLY - gen_psw_addr_disp(s, gbea, 0); if (per_enabled(s)) { gen_helper_per_branch(cpu_env, gbea, dest); } @@ -375,7 +374,6 @@ static void per_branch_dest(DisasContext *s, TCGv_i64 dest) static void per_branch_disp(DisasContext *s, int64_t disp) { #ifndef CONFIG_USER_ONLY - gen_psw_addr_disp(s, gbea, 0); if (per_enabled(s)) { TCGv_i64 dest = tcg_temp_new_i64(); gen_psw_addr_disp(s, dest, disp); @@ -1169,13 +1167,14 @@ struct DisasInsn { static DisasJumpType help_goto_direct(DisasContext *s, int64_t disp) { + per_breaking_event(s); + if (disp == s->ilen) { per_branch_disp(s, disp); return DISAS_NEXT; } if (use_goto_tb(s, s->base.pc_next + disp)) { update_cc_op(s); - per_breaking_event(s); tcg_gen_goto_tb(0); update_psw_addr_disp(s, disp); tcg_gen_exit_tb(s->base.tb, 0); @@ -1189,6 +1188,7 @@ static DisasJumpType help_goto_direct(DisasContext *s, int64_t disp) static DisasJumpType help_goto_indirect(DisasContext *s, TCGv_i64 dest) { + per_breaking_event(s); tcg_gen_mov_i64(psw_addr, dest); per_branch_dest(s, psw_addr); return DISAS_PC_UPDATED; @@ -1249,6 +1249,7 @@ static DisasJumpType help_branch(DisasContext *s, DisasCompare *c, } /* Branch taken. */ + per_breaking_event(s); if (is_imm) { gen_psw_addr_disp(s, psw_addr, disp); }