From patchwork Sun Dec 11 15:27:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 633089 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1994111pvb; Sun, 11 Dec 2022 07:35:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf6EOn515Emhfwbt7OFq8NnxA/qAoiyuI97K3vpoRFYNhXMrgkEoKaK5Ngbw6/1NSAjbz2LP X-Received: by 2002:ad4:57c8:0:b0:4c7:8cb9:26f9 with SMTP id y8-20020ad457c8000000b004c78cb926f9mr19841854qvx.21.1670772948664; Sun, 11 Dec 2022 07:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670772948; cv=none; d=google.com; s=arc-20160816; b=JAsph/T0E98Pei/oyZ1H6HbWoQ+5GPbmr1L8qEi/7mzX94aAgQxd+7XY4HAWP6qpVD /C1BJpF38dFTAUzKSyS75HUDyLf+gk7Etx6nGgtAllmhbLgt8gMEYtjqHBVkWPc56/aq OaLfHfs7ChoxTRoh1QMpBrhlF3BOcSFpOp1tq+xEzJ/Oke+PNFI3UgGJ/s6rCrepwGA8 OfhmEZ66AjcL/uPhinTMalTMBl/rfPjYEcybj72d/0n0bpo+Hm08wjZEcj/LTRvhXUoq ZbDk/VrdcSFkitfZApDAFupL54Rthr9q8fpB570rC3gvTRohJd+ncquxeFwVXGnnAxsM QHhQ== 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=4asYNccrx+BoU0MZdEMWP1GIa6QY2NIQn/AOiNqMEuM=; b=g+c+Zi4iIpF6c4It14ybZNxZRiQ3SKo/9ClIEydCU4liaYEaXVfdn4xg7w4jIRHqQE GteOt6NwChkSEsF06OAg/t3HFxQMO2HMK/yrQ0AOAFCdEkJMbSoDVqiEYKgd9Lh8iFa7 LCVTnoTnbtQwjIpGzCq04TFe2hg8JH/qpVSvavemhdtpNFDjGsTcOt5K59Yi73yPPXhW 3l/frNKtR5WccnLkWQvsIYBFe8+z4MqLmbchtz6iYLGB8PHXk5c+hWcSWKhf0JWSU5Pk FHvpuRMwmpIu3J7biPh1pR39uhwi6l3GBZqsBH203vGtX0z4VPW+5BS7FDKkUfmg1AIG nUBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PGYc+c7K; 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 q12-20020a056214194c00b004bb933e590csi4050737qvk.28.2022.12.11.07.35.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Dec 2022 07:35:48 -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=PGYc+c7K; 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 1p4OG6-0006Zh-IU; Sun, 11 Dec 2022 10:28:54 -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 1p4OFv-0006Vz-NU for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:45 -0500 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4OFj-00084b-TI for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:38 -0500 Received: by mail-ot1-x334.google.com with SMTP id m7-20020a9d6447000000b0066da0504b5eso5824187otl.13 for ; Sun, 11 Dec 2022 07:28:31 -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=4asYNccrx+BoU0MZdEMWP1GIa6QY2NIQn/AOiNqMEuM=; b=PGYc+c7KPgL8q5LcoXEzzt1Mc8Xif7H1P4/oAc/ANdrBEgMPd5zypMph0Jw+GfGlfY ujoFKhbSq7atBBMOy7lxniQRp317tVXuziSJDQWDTgM4+HkudYK1TRlD25I6wqYMUi9n t3ffy/foZl0KCkUxxiy+bgH2HPN517NAZIvEGm0S9Zt7nK/F3QluKTTZVKZpmevF3KGU FAgE/8OtfEbBdOtJI92bzI3R8jDXfUCdoAT/mKLVxIc3ulC6BY4pqJatqrPpBf0yPCkl yjXQszyl2yVfmdKX5NxmHjuBngcnpPSMiVklqDRLtjas+mC7Zsd6B+uSTN7+UwKYpwXb d8Fg== 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=4asYNccrx+BoU0MZdEMWP1GIa6QY2NIQn/AOiNqMEuM=; b=nAi1AOOdyKRQRXtnjVyjTWj06Ir7Y6GVGfbriD/XjZNXw6lmZm7A50pWG7Pk0KNvF1 GueIJ5LgqGLw3asxtTGUDz3EVzPM0oOvOYiilc9ZNNpICeEKcJStfV1gNd9aYR6bnGwt kgXGIlRejBzfksl1IxvgZaWKjhovn+qdYUfdZlRS2XVLfo1J0VuiYegWvNkAvmquz4L9 qh1lUhyzzw+NZEHoTSkR4Hyp2nbDh+ZSy/jqAEIgcHcCxElkQY8wxHf3tzq6odiybeNn qTk/OrycLGVhD5wU1rtLetdjd50nskX6uqd/n3gGVCgvPZs+6n+ia89iUCKCZty+tyMa U/3w== X-Gm-Message-State: ANoB5plqwfGng7pX2ZiDvjOQRAjZmCzoAMoZ4MxBjCPHrtwihQoig0sJ Py+f+cS7DI4n4OAubdA7KgqPDidKFn4j9GeN3Ag= X-Received: by 2002:a9d:7f0d:0:b0:66c:8b9f:86ef with SMTP id j13-20020a9d7f0d000000b0066c8b9f86efmr6277381otq.21.1670772510851; Sun, 11 Dec 2022 07:28:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 07:28:30 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v2 22/27] target/s390x: Split per_breaking_event from per_branch_* Date: Sun, 11 Dec 2022 09:27:57 -0600 Message-Id: <20221211152802.923900-23-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::334; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x334.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 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 b7c0d24d75..6006db3db2 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -353,7 +353,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); } @@ -363,7 +362,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); @@ -1153,13 +1151,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); @@ -1173,6 +1172,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; @@ -1233,6 +1233,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); }