From patchwork Sun Dec 11 15:27:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 633081 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1993053pvb; Sun, 11 Dec 2022 07:33:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf44etrD3rcmchsn2F7djH1J8FXZIomEsClxzMrDdXUCzM6WHMH5BzKou0nRtP6mX5cUuw02 X-Received: by 2002:a05:622a:4ccd:b0:3a5:ad81:8aff with SMTP id fa13-20020a05622a4ccd00b003a5ad818affmr19247053qtb.55.1670772797681; Sun, 11 Dec 2022 07:33:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670772797; cv=none; d=google.com; s=arc-20160816; b=wQl6kVDDLuCeYIXGwasZ768IlvqLfESusZLVOHvuWgP5KBHxHWvw0J872xMyWPxgty b0pUa9J1dK3Iid++jO3AuaxqPVfxmPu7k5pDiEWTSPNBw4XRm3WlLKmsJSCQAzyiJpQJ KvchoSV5EEwARKrjmLHEUPlhSxQCKAlyf6rgNvv28vDUdD+FhFTX/aBJP6G/ghGAUlW/ eEgqdiXeYm0D3DcaHP/ajh0KzEqh0l2lSOF/z02+8qaz8x5TNFB4MyA9qdBMLSaWCocA sBD2L28viSkoslC91Rs8cLXHMR42f+VNY7c1hFHzh1xXSzp7OdVill4r7KzPITgXGVHr FeaA== 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=Z/skUfQCFQZ4X+J8MZM9bNAFhJbunyBxd+pVFGi7o9I=; b=x1Rx9H+THPvy6VAkj/Vlp9dn+CxlyNSuI0OFD7WU5cHm6TaXFD0oIMepPvQ0TtkLxY LxrSKcwO1xURIUqzJecjNIoo0QedL5L2LmXuwnSPJA+i3k0sBfxYZagxga5BiwZWwpdc muA202IJ8yOXZWoZj8yu2ijgkj2ZzmnOkUGdFPHWqhSopfnSinAu7ZAfs5s3ySe60wAe xhLOenuS97lgoMfYDDNatROEHS38otxdBqXmZEeE7Px9xX4DYO7VZTIHy8nNqnQpGYIU mq7YW6tG5HFPxcH8N3oOOlB1SzupiKb96+zQDCBjUvXG9TY2s33ALUy4iAUAPwn47qax vPDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kfNIvMO0; 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 v22-20020ac873d6000000b003a50bd9617csi3850014qtp.588.2022.12.11.07.33.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Dec 2022 07:33:17 -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=kfNIvMO0; 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 1p4OGD-0006rB-Pv; Sun, 11 Dec 2022 10:29:01 -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 1p4OG1-0006XP-8n for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:50 -0500 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4OFl-0007Vy-L4 for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:39 -0500 Received: by mail-ot1-x335.google.com with SMTP id s30-20020a056830439e00b0067052c70922so5834780otv.11 for ; Sun, 11 Dec 2022 07:28:33 -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=Z/skUfQCFQZ4X+J8MZM9bNAFhJbunyBxd+pVFGi7o9I=; b=kfNIvMO0w13rzx/eQcX17mX5HHmvtv7BCqbTd4I+NrKPlKCEmnJ8xc3/Yt6Wa0qZRd 4PxdEWHXmeUPLqatdzve5iT9MflW9+4kAKMwCcDV5JtOaT2k4os1jr92hoY31nCsyXGA MVNAogGJqkL9IPbINw0cHfOgTAYE3NDrTtXI+UbxdOaNAw2jBAg5qMpGFGLtuAL4QUR3 Nakp7xf0jOJ1IKY5+HwcQmAjDdsl/fm53m5lb4ZZdGeHajoFDU1L6f/25s1lVN0MAvaH VCQpekzXoD6h88e2shd9DooHEIutDTM9t7GwvGXiZBRYUf706ckGCeC8VNJuLhXv7USI TVCA== 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=Z/skUfQCFQZ4X+J8MZM9bNAFhJbunyBxd+pVFGi7o9I=; b=jNke7+1KKbt51NOytGGC+DHYaI3mfMH2XGAPlfK3Rti8jN7YD5Y+/Q/yBwo4LIqI6D diCrOnXCsIr2pHtnrNXELJSLv/PhIjrYWgmTzWRQNNnrQGsVZ29dguNgR2WLj4OT0hJ9 M7hT2lpPtTreOFQ0rSx2NeGWXSTxu/tT6aQkiM5z2/b5SUPKGZHBspcdYr1pO6ZMCS0/ vjbxBkRBk+ppXPgtpGYD20dN/C4DUkZqmmwJe31bUmaZl+g1Nky2pxlO8iv2hizdXMko Yd2yJwkJ043L37nJsoAFtPAct3Lgz8ucLolA7WlfnR/ubbirmJI7THqO8TTWPE577rHy g+Bw== X-Gm-Message-State: ANoB5pmkrHXxfLuufLr20BQkz3zzUt/b/jZUsLdqA2hdGTQcImh8FlJR iS/ihxbEfRx6nkMmKJJa7ZgYcsWct4zaEXGAbzU= X-Received: by 2002:a9d:6405:0:b0:661:dfeb:ea34 with SMTP id h5-20020a9d6405000000b00661dfebea34mr5728580otl.25.1670772511975; Sun, 11 Dec 2022 07:28:31 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 07:28:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v2 23/27] target/s390x: Remove PER check from use_goto_tb Date: Sun, 11 Dec 2022 09:27:58 -0600 Message-Id: <20221211152802.923900-24-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::335; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x335.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 While it is common for the PC update to happen in the shadow of a goto_tb, it is not required to be there. By moving it before the goto_tb, we can also place the call to helper_per_branch there, and then afterward chain to the next tb. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 6006db3db2..268de1359b 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -654,9 +654,6 @@ static void gen_op_calc_cc(DisasContext *s) static bool use_goto_tb(DisasContext *s, uint64_t dest) { - if (per_enabled(s)) { - return false; - } return translator_use_goto_tb(&s->base, dest); } @@ -1157,15 +1154,16 @@ static DisasJumpType help_goto_direct(DisasContext *s, int64_t disp) per_branch_disp(s, disp); return DISAS_NEXT; } + + update_psw_addr_disp(s, disp); + per_branch_dest(s, psw_addr); + if (use_goto_tb(s, s->base.pc_next + disp)) { update_cc_op(s); tcg_gen_goto_tb(0); - update_psw_addr_disp(s, disp); tcg_gen_exit_tb(s->base.tb, 0); return DISAS_NORETURN; } else { - update_psw_addr_disp(s, disp); - per_branch_dest(s, psw_addr); return DISAS_PC_UPDATED; } }