From patchwork Wed Jun 30 18:31:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBA79C11F65 for ; Wed, 30 Jun 2021 18:34:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DAFC613C3 for ; Wed, 30 Jun 2021 18:34:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DAFC613C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf2b-0007v7-MV for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:34:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00055S-JV for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:38586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0g-0001xN-Ml for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pg1-x534.google.com with SMTP id h4so3185397pgp.5 for ; Wed, 30 Jun 2021 11:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CYAA0gCcixaZvejCGIEmqi8brwY1zVT0feeRzB35ZxQ=; b=oti2FHeChbI1wdzzHQpYrI5qRwC97GMusq3vx1fF+wKn3/9cNBzNADp8l9JErDQ8O1 7opXMsZRYEIV77sxm1NE/A0fm+G32LUzvC1UGZhwDV0QEHVQLkTHeyON3TCbx7zRJ75d lxOAp2SST30XuVGm3sqQnUwm4qRHnTy0uCg4JcmkahrgdzPGKarNq67W/KMp80/oQVn3 T4I4ytDBS2csvNQYORLHLQfO2xnQzFS1JmKjGZ1Vz3rl0fDinYyVZEIUHz9FdfAm+fql l72IECWa4tVXRy134jMqphdejHuP6atAED3QklzpmZDxf2rjrQm/X/Auy0NbcNPsIc3p cK6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CYAA0gCcixaZvejCGIEmqi8brwY1zVT0feeRzB35ZxQ=; b=drpEM36Xbqbd626B185L6KV+EQE30E82PWgCepaPIDD5CcpSa92kN1Y+vNyn2pOL9r i+9O3d+IX/T5gvs3UuTsm/tIOTPE5h6Jb92SHgFbpRB6W5O3OZBWa48vfXoFpPgQ+E1w PW2z2FkX46AM45baZ8hoZPb5yBGCUJK/ohm2X2SfIoDI8lUJiJDv6w1WVLOuVTyWkgmO dQf67ywXTSH8G9s+lf/ppEpRwj9gaOqvSegtB1IGE5T5Kcdj5GfKwP8jGKbsnWMhC+lG tOr/vTkFTWkV3eO8pn3mYnylOA/WCfisv6+QiP2O4Dcv9LJ0ke/KuBIXrE+8Wq81w2M/ lGSA== X-Gm-Message-State: AOAM530oqOQGBKea+fPbj5xfMS9GKMo+q2YsB/mZGsCQ+/JYSSve5Rna GSdmiUSzj+lqTm37vYp3+TK3c+qg3vbDig== X-Google-Smtp-Source: ABdhPJwH7SVej9WpqRKD2QeiC86agGgjyEYZ1+hbAByDcU7yLxhDe98dQLiL7srg44isqgzj+8BSzg== X-Received: by 2002:a63:230c:: with SMTP id j12mr3607238pgj.382.1625077948664; Wed, 30 Jun 2021 11:32:28 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 01/28] accel/tcg: Introduce translator_use_goto_tb Date: Wed, 30 Jun 2021 11:31:59 -0700 Message-Id: <20210630183226.3290849-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add a generic version of the common use_goto_tb test. Various targets avoid the page crossing test for CONFIG_USER_ONLY, but that is wrong: mmap and mprotect can change page permissions. Reviewed-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/translator.h | 10 ++++++++++ accel/tcg/translator.c | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/exec/translator.h b/include/exec/translator.h index 24232ead41..dd9c06d40d 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -145,6 +145,16 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db, void translator_loop_temp_check(DisasContextBase *db); +/** + * translator_use_goto_tb + * @db: Disassembly context + * @dest: target pc of the goto + * + * Return true if goto_tb is allowed between the current TB + * and the destination PC. + */ +bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest); + /* * Translator Load Functions * diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 1d32732198..59804af37b 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -31,6 +31,17 @@ void translator_loop_temp_check(DisasContextBase *db) } } +bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest) +{ + /* Suppress goto_tb in the case of single-steping. */ + if (db->singlestep_enabled || singlestep) { + return false; + } + + /* Check for the dest on the same page as the start of the TB. */ + return ((db->pc_first ^ dest) & TARGET_PAGE_MASK) == 0; +} + void translator_loop(const TranslatorOps *ops, DisasContextBase *db, CPUState *cpu, TranslationBlock *tb, int max_insns) { From patchwork Wed Jun 30 18:32:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32770C11F65 for ; Wed, 30 Jun 2021 18:38:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE1CB613F1 for ; Wed, 30 Jun 2021 18:38:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE1CB613F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf6h-0005KD-5T for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:38:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00055R-Ex for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:44751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0g-0001xy-FI for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pf1-x42c.google.com with SMTP id g21so3293517pfc.11 for ; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=ATtaXdMXnhF5nQIO17QxLhyrN5NbccW8YtyBbOw/u2/7eJSP7qonNirtNNNltd2ChL iEIXR0exj9zSh638oocrajTwMEvQngr6BZ5ksdfcO/1wktm87Y2IiFq4yXCQFbNBcdPo P2cAdGGTWOraR9ifmssxIvWkpugFyhbAZpXKJzYXZlKQDgp8Cvorb5SP3+rrp7qRWEsh pPthfkjQJS4q++N9VUyfhZ7UJGU73W12xbc3vNJsClbpcxn1EC5p7OI3pbDNA3ZtWMoV uRx2qSFVJy7oVUG2usVVOozC534i4I/rudZu4ARE6lyVd1HYrs3WRDAiHhzcN7olYv26 sadg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3aENiAfNt4e6plWtqF3mZo/s7tnSV/nuj/JuhYL6FAk=; b=biaGbIdgWhxifB11pHkpCLtXCEGprkXIPrEwZ0LJ/5/svN/vuXxAMAwsuAeSovi6xY IiefAGRg+NUJBnNIG+pFWPT4tUirgWw2e17WZHi+xNdAbqsIp9LeQHUmM8kWXgvaoBgp d4tW1Xv9tuPtZCpVLLlQr29MIWJL0xVD0Z8LIkD1VflmiWF9ONwyfCpziC/7plVYTMx1 wFk8EZJadjmNoL7yBah8l2njP/HPs1ydXA4rXdiGPuBKTV0vnz+MkSsW6x4HJ2jYeWZk Y5+XVyRbAfrrt3V7R29XJDKgSV0VGAa1WpkJ3uOMEc3CethYX4sH/c2XTekgGxOgtElC 6DsA== X-Gm-Message-State: AOAM530mN14cAia3/DjW3HP4BTevXEqqbRgcod8fEJzSZq8enXk/il1c pP66tikxSdBo3Tinp1XyKr/+CY5CCxmnoA== X-Google-Smtp-Source: ABdhPJxDUX4YhAi0YT+T/9H5ShHyob3y9sj+rKnwsXtXLghWdwQtj0GSvE6mpv/ORYXAHuuzcOwHuQ== X-Received: by 2002:a05:6a00:882:b029:30d:cd4e:79f with SMTP id q2-20020a056a000882b029030dcd4e079fmr12899320pfj.75.1625077949212; Wed, 30 Jun 2021 11:32:29 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 02/28] target/alpha: Remove use_exit_tb Date: Wed, 30 Jun 2021 11:32:00 -0700 Message-Id: <20210630183226.3290849-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"). We do not need to use exit_tb for singlestep, which only means generate one insn per TB. Which leaves only singlestep_enabled, which means raise a debug trap after every TB, which does not use exit_tb, which would leave the function mis-named. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/alpha/translate.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index f2922f5f8c..aaedf78116 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -450,19 +450,8 @@ static bool in_superpage(DisasContext *ctx, int64_t addr) #endif } -static bool use_exit_tb(DisasContext *ctx) -{ - return ((tb_cflags(ctx->base.tb) & CF_LAST_IO) - || ctx->base.singlestep_enabled - || singlestep); -} - static bool use_goto_tb(DisasContext *ctx, uint64_t dest) { - /* Suppress goto_tb in the case of single-steping and IO. */ - if (unlikely(use_exit_tb(ctx))) { - return false; - } #ifndef CONFIG_USER_ONLY /* If the destination is in the superpage, the page perms can't change. */ if (in_superpage(ctx, dest)) { @@ -1271,7 +1260,7 @@ static DisasJumpType gen_call_pal(DisasContext *ctx, int palcode) need the page permissions check. We'll see the existence of the page when we create the TB, and we'll flush all TBs if we change the PAL base register. */ - if (!use_exit_tb(ctx)) { + if (!ctx->base.singlestep_enabled) { tcg_gen_goto_tb(0); tcg_gen_movi_i64(cpu_pc, entry); tcg_gen_exit_tb(ctx->base.tb, 0); @@ -3095,7 +3084,7 @@ static void alpha_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) tcg_gen_movi_i64(cpu_pc, ctx->base.pc_next); /* FALLTHRU */ case DISAS_PC_UPDATED: - if (!use_exit_tb(ctx)) { + if (!ctx->base.singlestep_enabled) { tcg_gen_lookup_and_goto_ptr(); break; } From patchwork Wed Jun 30 18:32:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E944C11F65 for ; Wed, 30 Jun 2021 18:42:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 296C961420 for ; Wed, 30 Jun 2021 18:42:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 296C961420 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfAB-0002kq-59 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:42:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00055b-TZ for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:44720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0h-0001yf-57 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pj1-x1029.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so1982956pjo.3 for ; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YzHaNSHTcPGqhF/jUvUjsx0pHeg/Xl1qSkbxFOtUk2A=; b=ad8vUANRHI33010LsIYZjmAxK34WCI+Jmbg2mhL17Cj5uSBBfQWHfqdRVUyZBGwQMG 5llcQnAruDaPaxGASnJfxDNoVecHYq0MdnM6vwwfIfF1EtkVlt40qVCmREV6mk/h17CP bgMH6OAAwowsVyfxJPuXkdzMJGwqwlSgFtNr46syU7XGf3iQ076eJkRS1gYAb0RaVuwm BlecgH9PFSOtwoxQftOOJPc17tl+Oe/W6YjpIPYxOX7asCi6OF8aFHWbOGq51USjh78Y 5O1btnIE3NCafIGmDSjQsLNdlDa/5nLdDe8FDBGGIdeggzHESbMCuCyE7/PWiiNrXzYj zZ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YzHaNSHTcPGqhF/jUvUjsx0pHeg/Xl1qSkbxFOtUk2A=; b=ef6gSjWtfesRh6E84Fg1LoCpZSaRmi+Jx50ANceljf6ODOzNoEpCP0qCwgVMYAJfcd yFNNWehTe5W2+wdCWG4Vslnpc68PRohAZ2Z/bHAFvqf5R2o3SVv9lStg/wtHE1TlkQKU tc4yKdDPA7cxICLMlAFlKMWEG1rJ4U+x64lsigOoK4M6yqH72EX8sHx08cHaWTxW0Ms0 ZoC38ij3c9w0BkzHWeXxP7GaGP7MOnEGjnrWbBKRCHH6ngIiYSEAFOITY9gPZG5ND/ey BIAcxEpE/EfWbUw2UFzgo+sXcxE1qSfFXdE2F6VVUO/c4D+BUoHMvcV8Sa3JuJsgEKBt LeOw== X-Gm-Message-State: AOAM5334e5BfWzzoK7LzV6iZg/AqYdWAJyUKpglP/tAxGHgRYMuPJwUH b9wlNOr+MU1LUFKxpLDBqIoqN8AUirh5yw== X-Google-Smtp-Source: ABdhPJxUSD0BXntqfFWQ5v4KYZ7w9FFY24I6HKz7W8Cp3ER9u1zM+RXepiqc+UviS/1qnKwXcTtBpQ== X-Received: by 2002:a17:90a:c58d:: with SMTP id l13mr5719773pjt.186.1625077949883; Wed, 30 Jun 2021 11:32:29 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 03/28] target/alpha: Remove in_superpage Date: Wed, 30 Jun 2021 11:32:01 -0700 Message-Id: <20210630183226.3290849-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The number of links across (normal) pages using this is low, and it will shortly violate the contract for breakpoints. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/alpha/translate.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index aaedf78116..8fa00a79d1 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -439,24 +439,9 @@ static DisasJumpType gen_store_conditional(DisasContext *ctx, int ra, int rb, return DISAS_NEXT; } -static bool in_superpage(DisasContext *ctx, int64_t addr) -{ -#ifndef CONFIG_USER_ONLY - return ((ctx->tbflags & ENV_FLAG_PS_USER) == 0 - && addr >> TARGET_VIRT_ADDR_SPACE_BITS == -1 - && ((addr >> 41) & 3) == 2); -#else - return false; -#endif -} - static bool use_goto_tb(DisasContext *ctx, uint64_t dest) { #ifndef CONFIG_USER_ONLY - /* If the destination is in the superpage, the page perms can't change. */ - if (in_superpage(ctx, dest)) { - return true; - } /* Check for the dest on the same page as the start of the TB. */ return ((ctx->base.tb->pc ^ dest) & TARGET_PAGE_MASK) == 0; #else @@ -2991,7 +2976,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) { DisasContext *ctx = container_of(dcbase, DisasContext, base); CPUAlphaState *env = cpu->env_ptr; - int64_t bound, mask; + int64_t bound; ctx->tbflags = ctx->base.tb->flags; ctx->mem_idx = cpu_mmu_index(env, false); @@ -3020,12 +3005,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) ctx->lit = NULL; /* Bound the number of insns to execute to those left on the page. */ - if (in_superpage(ctx, ctx->base.pc_first)) { - mask = -1ULL << 41; - } else { - mask = TARGET_PAGE_MASK; - } - bound = -(ctx->base.pc_first | mask) / 4; + bound = -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4; ctx->base.max_insns = MIN(ctx->base.max_insns, bound); } From patchwork Wed Jun 30 18:32:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352675 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 334FEC11F66 for ; Wed, 30 Jun 2021 18:34:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5C73613C3 for ; Wed, 30 Jun 2021 18:34:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5C73613C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf2c-000814-W4 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:34:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0m-00059F-0F for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:36 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:51761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0h-0001yi-J3 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:35 -0400 Received: by mail-pj1-x102e.google.com with SMTP id n11so2386475pjo.1 for ; Wed, 30 Jun 2021 11:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dZt3Z++y99AGLIT8n4FaOlYOmeXV3kfGnWJ9nKg5oaU=; b=JYk3+ZtR6XsxKQCbh/W8aBJ1epmQJmi9sO/7xeK8d2ouVZsM7svTwDJs+9sLXDHRS5 kg8Fs+y+UVYca8Mju6KEQCz+3ABSQAMVV8nEBprIohchh0fLFaDQokyQDgw4tM0trRwn Xxt4BRr3mkbpdVHC71V8xBBcvRpYvK6wBMbc0n49bI5Q0pQnBrhgTWC68lc7i1Ka+Rgi Zq2v/eDhtx/Fx95kQW/iQE/rVq3O5FomNSfCffutZp1BaxO/lY6+Hu5R68m+ZnQVtrQp rdsX5+GyicuRX5WUHSBfgWrKQMgxBtbGU04ZCUlMODKLzVU3N5WaiuSnfLNkq6tha2Se dmFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dZt3Z++y99AGLIT8n4FaOlYOmeXV3kfGnWJ9nKg5oaU=; b=Mxm0/a5gZKXkVDKerh3UjEQ8OVX9qrr5PngV6Pmdb8A1v9Yt2kBdWvRf1XqsfJMr4C JQnAXH/ULsAGKwl985azt1PS3Q/KWSNvLMnVSzU4Y3elZNfzKraeYinLS5LcZEjxIXud hJ37PTI+mRv7etWtkXlnAL04Eyr/KSS5C2hjMcXlHrVekiS/WtS07puz/hDq8tp7cqpz AxwZBxzpzoLaF2qU9XqUcHDHlcDEFrkbjfSV47/5UJjxfyiWNRn2oB7aenf89XBAOI8Y 6AOrhPiHS0t4QKknBlQi2+dTu2r7aDSP4LFFsx2daH/oTgTZAsF5ieVcOhwMn6xUFBOU D2/Q== X-Gm-Message-State: AOAM532hFKbJxmxdnJUEICjNagCh3on7zK1D8PKxCFvKASGq4do1KcIp x5ABrmBoNoewUpDNnI6zJ8p1BAsAh/C7Lg== X-Google-Smtp-Source: ABdhPJyXZhV758pTJtES1ZkTBbgRig+6zkgvpk8MUXd0c/df3Vs1tV58FfPY0VesmBiFa7LCcKl8UQ== X-Received: by 2002:a17:90b:30c2:: with SMTP id hi2mr5518631pjb.130.1625077950413; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 04/28] target/alpha: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:02 -0700 Message-Id: <20210630183226.3290849-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/alpha/translate.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 8fa00a79d1..de769f7633 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -441,12 +441,7 @@ static DisasJumpType gen_store_conditional(DisasContext *ctx, int ra, int rb, static bool use_goto_tb(DisasContext *ctx, uint64_t dest) { -#ifndef CONFIG_USER_ONLY - /* Check for the dest on the same page as the start of the TB. */ - return ((ctx->base.tb->pc ^ dest) & TARGET_PAGE_MASK) == 0; -#else - return true; -#endif + return translator_use_goto_tb(&ctx->base, dest); } static DisasJumpType gen_bdirect(DisasContext *ctx, int ra, int32_t disp) From patchwork Wed Jun 30 18:32:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FE1BC11F65 for ; Wed, 30 Jun 2021 18:45:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B25B61285 for ; Wed, 30 Jun 2021 18:45:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B25B61285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfDg-0008Tl-1Z for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:45:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0k-00055w-3e for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:34 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:40455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0i-0001yp-6y for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:33 -0400 Received: by mail-pf1-x42a.google.com with SMTP id j199so2860730pfd.7 for ; Wed, 30 Jun 2021 11:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dZ0tLrfANOVxMWpkjlBjlY0SUk5qXlMLl88Ghw1NubI=; b=RwZsGG2QOkBMwGuAF4pYiDvR00hb7nSQlTyO5J0n0/xrlu9I26UWxigbt00OV7pP8g NZYOWJEACf3gdSQxeQ48qT4o0uh0yCaK+WOY9EO9A7yNIwqtWQZ5g0G2HBxDqh+nNPx+ F98eg+fWFFCPGyL5fzwZk0kZFhSOl0YluRKi7eWHmOS6lMwdRQSsrqxjojLtxF1R2q5L nHxJtF5PAn3rd0ZVvVW+3VoqJRe86XqzekLa3XNsEPgfB5PJ23Vv7qjuduK8uAHET1yb sZWZH+NGoYCJFX/u+/kJ5opJp7A3qXx6pLdSuVBLJh5eV0SI4K4cGbGrWhGcGnpwH+f6 0yaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dZ0tLrfANOVxMWpkjlBjlY0SUk5qXlMLl88Ghw1NubI=; b=FgEHZYEc3ti408lZ2BoKW0xWoLUzFY9XM2VO/QYfARqGmL6D5yRcQ52xmAyvUKoDoP LieKY46Krlk4rcBzEq00gKLa5aQmeWYtGowVs0L9VxCK5oy3FGONrZEygdUPzHLs4FqK 4W3Y40bNj+W13hiDndCGiK2YUPQT5HSN9c5X9NjLl2sB9yo5elcrLb53eGg7BiLeVLw+ VPuDeopiu7k0C+yzru6WcUJNXlkmHF16nl249pH7OxOmms6bmGpTcnQW8ZcWnxagaZH/ y64uGmkaSD424WmtsUuwCKMES0dBIWTmyMksct43WrD5SVsKJ84+PebHuhrV24kZutX2 dTow== X-Gm-Message-State: AOAM532oFoi4TLdN26QLL9F8jYX1WlAmiduuc7acJzlSIuRyU7xssv6I N0jS8562Bcu4qYsLidBypXIKUiYfUovxXA== X-Google-Smtp-Source: ABdhPJxEr4KGH9s7GuAfKZEcLUER01Vqy1LpFOR1Mn7Zw/ZgjkKYU/NSLAoXkD+I54b/CYYFoi6pqA== X-Received: by 2002:a62:3344:0:b029:24c:735c:4546 with SMTP id z65-20020a6233440000b029024c735c4546mr37827189pfz.1.1625077950953; Wed, 30 Jun 2021 11:32:30 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 05/28] target/arm: Use gen_jmp for ISB and SB Date: Wed, 30 Jun 2021 11:32:03 -0700 Message-Id: <20210630183226.3290849-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Using gen_goto_tb directly misses the single-step check. Cc: qemu-arm@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index a0c6cfa902..8cd31feeaa 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8582,7 +8582,7 @@ static bool trans_ISB(DisasContext *s, arg_ISB *a) * self-modifying code correctly and also to take * any pending interrupts immediately. */ - gen_goto_tb(s, 0, s->base.pc_next); + gen_jmp(s, s->base.pc_next); return true; } @@ -8596,7 +8596,7 @@ static bool trans_SB(DisasContext *s, arg_SB *a) * for TCG; MB and end the TB instead. */ tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC); - gen_goto_tb(s, 0, s->base.pc_next); + gen_jmp(s, s->base.pc_next); return true; } From patchwork Wed Jun 30 18:32:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352711 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE7E3C11F65 for ; Wed, 30 Jun 2021 18:49:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94CD761426 for ; Wed, 30 Jun 2021 18:49:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94CD761426 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfHO-0006mF-IC for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:49:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0l-00057X-2T for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:35 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:34542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0i-0001zX-Rg for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:34 -0400 Received: by mail-pg1-x52d.google.com with SMTP id a7so3214040pga.1 for ; Wed, 30 Jun 2021 11:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VwYP1FR59CBcY4SbMQQt/obAK3lfRhuxdMKBAeBeX6Y=; b=IQGFsnUezhZRccJzGFEYPeseANzTao5sqQZMZMtSRL/Qg+rcwtyOxcS3yNXAMG81Kc /ZSOasmj3d7h3DVxO3piWO/DuSnjXT9nJhMId92Gd6MM3fvHXjrU7cfit9QdjZ2Jb3Ju NOixqpmhIq6ELWkpWBCBkqy7wMCLla4vssrpdIE/s7zFd/YYeobDxBdODENY77iUi9FL bHDNw1E7oilsagI/y83GG612HQcPSM58HZZb79huE69SCPaiWJRIfJ6kYyUBLAV6IEGk 4lApAil34P82PpiycU+99nnYqpSsClXpDThI4Q2B5BTrxhAzjY/jR8CeDlHg92fwMx8j 7S7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VwYP1FR59CBcY4SbMQQt/obAK3lfRhuxdMKBAeBeX6Y=; b=NKRDDzc1IevFzfYyK6XjkFvk3WnkvV+JHhMIa4t92maNNOnaERyWiUFdtqi1IP8GdW i1uAlukhTvDcT2T58ftw8sPj6vaEomSM7kN+ikFVsmlcC1bn4zCmOGfF0Vif59o4ZJ91 Pz5LeX1J6ySeim2ViVLDsK92aSQWmP3vL8mdV17UVtuYhNUdkMvIbTXyjioffKIsip6n mxEXTCg2oJSqyKz2uOBA7WfwasY/LW53GLUzDVaIio/mROG0SvZ/HX4CsCZcXs3xqrrs uTlWfp+rvjDr+MHAXshWb4uKftmQUwiykZB5arJmIdLRzDW67pUa2nkkS3FnXSuX2jMw ubFg== X-Gm-Message-State: AOAM530/3lTIe6Yvg5xVgO2Iw/h5/VKH0bCPp2yw/AaENa2s1BWH0FG0 4SAXYrmvFf3oEahWiUsDPk8Zk1Y8YYqYjA== X-Google-Smtp-Source: ABdhPJw/6vn4rCO75Fs8m7uXDGI4ZtQjgood558fJitPWJpAvLIxWHOePHEPmT9f/9ZhG2h1HvWOQA== X-Received: by 2002:a05:6a00:1496:b029:308:29bc:6d4d with SMTP id v22-20020a056a001496b029030829bc6d4dmr34939302pfu.14.1625077951532; Wed, 30 Jun 2021 11:32:31 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 06/28] target/arm: Use translator_use_goto_tb for aarch64 Date: Wed, 30 Jun 2021 11:32:04 -0700 Message-Id: <20210630183226.3290849-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"), and gdbstub singlestep is handled by the generic function. Drop the unused 'n' argument to use_goto_tb. Cc: qemu-arm@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 1a40e49db7..eb1907d049 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -386,35 +386,20 @@ static void gen_step_complete_exception(DisasContext *s) s->base.is_jmp = DISAS_NORETURN; } -static inline bool use_goto_tb(DisasContext *s, int n, uint64_t dest) +static inline bool use_goto_tb(DisasContext *s, uint64_t dest) { - /* No direct tb linking with singlestep (either QEMU's or the ARM - * debug architecture kind) or deterministic io - */ - if (s->base.singlestep_enabled || s->ss_active || - (tb_cflags(s->base.tb) & CF_LAST_IO)) { + if (s->ss_active) { return false; } - -#ifndef CONFIG_USER_ONLY - /* Only link tbs from inside the same guest page */ - if ((s->base.tb->pc & TARGET_PAGE_MASK) != (dest & TARGET_PAGE_MASK)) { - return false; - } -#endif - - return true; + return translator_use_goto_tb(&s->base, dest); } static inline void gen_goto_tb(DisasContext *s, int n, uint64_t dest) { - const TranslationBlock *tb; - - tb = s->base.tb; - if (use_goto_tb(s, n, dest)) { + if (use_goto_tb(s, dest)) { tcg_gen_goto_tb(n); gen_a64_set_pc_im(dest); - tcg_gen_exit_tb(tb, n); + tcg_gen_exit_tb(s->base.tb, n); s->base.is_jmp = DISAS_NORETURN; } else { gen_a64_set_pc_im(dest); From patchwork Wed Jun 30 18:32:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19151C11F65 for ; Wed, 30 Jun 2021 18:46:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ABA3061285 for ; Wed, 30 Jun 2021 18:46:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABA3061285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfEP-00018l-OM for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:46:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0r-0005Rm-UN for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:34677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00020K-Ge for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: by mail-pj1-x102d.google.com with SMTP id g6-20020a17090adac6b029015d1a9a6f1aso4331155pjx.1 for ; Wed, 30 Jun 2021 11:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A7hAexeBQ5Ar+tSUN9C4Tdw7ktlK4SgTVxbaVoJ2i0s=; b=ihCziMj/HTV/Xl6uB6kQNq0V72HiCYO8CxkfPy453TKNlddisyHNuLIwOvXTVDgztH JYwznkd+mXm2SuWa3IBZSJN84BIKzIsCRNgskVb8IvYzkoUTI2O+aja5rj+GFmfN6j5W etHACZr+JOZBnprXC1w3Dy+Gj5x1pqPUTLT4tf7QuwHs5+GDXBWiMcISv6BOiJryMx42 zKb1vo+OelWK9tOuAMOxmuNndBB6YBsr3vEJkSFTgeRgLXgZu6fwVcjZdDDZrYBLXgfK PYUjdogpDSPHDAaZvu5A8Vz1inNRtAkBb9uozZ6AlGmf44zugTyB0WiJHEtGZ7D29I1p ByVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A7hAexeBQ5Ar+tSUN9C4Tdw7ktlK4SgTVxbaVoJ2i0s=; b=JAPi+JPiEdOeeB1kGAkYYJ0zYanxiJa5I6x1s8DJ70Xd2BvVz9gEX//+OqOKg5pYl6 05mG0Rxje7pLfCdcfED41X0sRRq3csh/cup8Pdh/8xy2bPDZj/QMPQ5/RhHxn3lirIEV NzW9HD8jWjbRKeyoDdKxMehyZwQLEUwOIpL9VGofVNr/aIvj0NpvrTxxV/wAMYafmJQp ZONAcyY37PJMNXwplN3G9EjP7y4hDqLlfiXMZnv7PyBbrAE8I+HtbK6xIQyyh4VGTu2i GdmqhPCd3VQIbUtqD/n2Bt9K8te7khtLijpzkph0fNl+PP6Gn8jH7w9x+NEfeuy2uou1 04Nw== X-Gm-Message-State: AOAM532iCaLGAjHj9cQ9NTPcMYB79vgKY/10ap4b5hpMcWxBPtrkuOca FJCzFRn7cnvNJl7i/Q8o8rAkwwXAQuyD4w== X-Google-Smtp-Source: ABdhPJyNWY98yaewYRf4o2IwqALuHbX3LfljY7P37SQZRvJ13bP2OwxEgKzJgRNuiJMP8Z6wItJsRw== X-Received: by 2002:a17:90b:3697:: with SMTP id mj23mr5658760pjb.118.1625077952128; Wed, 30 Jun 2021 11:32:32 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 07/28] target/arm: Use translator_use_goto_tb for aarch32 Date: Wed, 30 Jun 2021 11:32:05 -0700 Message-Id: <20210630183226.3290849-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: qemu-arm@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 8cd31feeaa..87c3c09df5 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -2509,16 +2509,6 @@ static int disas_dsp_insn(DisasContext *s, uint32_t insn) return 1; } -static inline bool use_goto_tb(DisasContext *s, target_ulong dest) -{ -#ifndef CONFIG_USER_ONLY - return (s->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) || - ((s->base.pc_next - 1) & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_ptr(void) { tcg_gen_lookup_and_goto_ptr(); @@ -2530,7 +2520,7 @@ static void gen_goto_ptr(void) */ static void gen_goto_tb(DisasContext *s, int n, target_ulong dest) { - if (use_goto_tb(s, dest)) { + if (translator_use_goto_tb(&s->base, dest)) { tcg_gen_goto_tb(n); gen_set_pc_im(s, dest); tcg_gen_exit_tb(s->base.tb, n); From patchwork Wed Jun 30 18:32:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352677 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28720C11F65 for ; Wed, 30 Jun 2021 18:34:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B329C613C3 for ; Wed, 30 Jun 2021 18:34:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B329C613C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf2f-0008D6-SB for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0n-0005Bv-QC for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:34372) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0j-00020j-Sn for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: by mail-pf1-x42b.google.com with SMTP id i6so3343071pfq.1 for ; Wed, 30 Jun 2021 11:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=SlOIausg4Hz3hJmCWvLEkzRhqbskKyU7TpFEFXCuLEtxGbF90YnW306n14zNBG2GM0 tT1EBK9KsRvRZZtvIv01L6ZBLVW4o10OdTfSxAaCCcCKIVimWqcPHC7XQThhtBI+LzO3 g3g4s2bKn7vAEG1yr4UKcy/7Lzol+9HZd7E4hLfuw+RzJy9Mhfcshxv9Urp0ThsA4guR CAJZqVmTblshVILHQfPhzdFQP0fRNQTCTjE3tzpKcWvyQBaMMzf7C7D9vZkGmgpboMvu IJ/S8a80UpMxUNsIbAAGPdxSeywR1mPBdlFtbsxL36OyB0Mgk8oGENBK+IaJOujwBvN8 XPcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=jmjf6pL89Gll81Z7pogI/+e//JXIwUpn6ZFWVMmbxhc6GIGW8H0pzxBOxJNaVX4dn1 zko3qNis0VGYMhR9fitSt1+G59h0Y5Qz+ElNCNidhZktHq4q+8WzgiUAFmHsxQf/4A+4 zvfo6KEpGMO1DOorT2U5d5JWMhfQ3RCTSz4Ooo6zhFfZVPKYXILY55BEFScb30w4RUWO j61JngiBMk6gWGVtMbOEj2N+BghFpxt6RGSGr/U6Re9PjohstPFTFqzHOL9I7OfXL1bC dnA419OiCEX0Ldn50aFxoVGmmhZJFJNbLXEhuAWNHWc2q60Z18GHiXKEX/+m7vJtDNg8 vXPw== X-Gm-Message-State: AOAM531oBjeHMGIgWVGXAxXhaiOFsbml8X/mkhuTuZSLcgc7BWhnhDXa zIqDWVSHGj113SLJMUzOE5gXcTDSvR0Ihw== X-Google-Smtp-Source: ABdhPJzPCuHITqRac7URQ/mJzlqZpFikothdLaYVIm2BDr40MmuEtrQFibadPw15LeO+0wvb/+i6fg== X-Received: by 2002:a62:1d84:0:b029:304:5af1:65f6 with SMTP id d126-20020a621d840000b02903045af165f6mr35035355pfd.80.1625077952590; Wed, 30 Jun 2021 11:32:32 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 08/28] target/avr: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:06 -0700 Message-Id: <20210630183226.3290849-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Rolnik Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Single stepping is not the only reason not to use goto_tb. If goto_tb is disallowed, and single-stepping is not enabled, then use tcg_gen_lookup_and_goto_tb to indirectly chain. Cc: Michael Rolnik Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/avr/translate.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index c06ce45bc7..8237a03c23 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -1083,14 +1083,17 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { const TranslationBlock *tb = ctx->base.tb; - if (!ctx->base.singlestep_enabled) { + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(tb, n); } else { tcg_gen_movi_i32(cpu_pc, dest); - gen_helper_debug(cpu_env); - tcg_gen_exit_tb(NULL, 0); + if (ctx->base.singlestep_enabled) { + gen_helper_debug(cpu_env); + } else { + tcg_gen_lookup_and_goto_ptr(); + } } ctx->base.is_jmp = DISAS_NORETURN; } From patchwork Wed Jun 30 18:32:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B20A3C11F65 for ; Wed, 30 Jun 2021 18:38:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48C5161419 for ; Wed, 30 Jun 2021 18:38:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48C5161419 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf6w-0005vN-Ac for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:38:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0n-0005AT-5K for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:37394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0k-00021E-9e for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:36 -0400 Received: by mail-pf1-x42f.google.com with SMTP id 17so3087656pfz.4 for ; Wed, 30 Jun 2021 11:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J78iIrV/uBjFzK3bTpbLy3S7PgpqgxUhkktjGy5U398=; b=GpcDQhn3rNZq22ejfC51ec1IHUChdfMXgZltxnQz6aid6/QPCGIpK2IECmRwcRB4u9 leXOYx460tvMC18EoKJad3WJKsIgVbH27GdBfH1HyfzXeWeTMYkoR9KA0unx7WTj8y5w xRMFGlyCEn5n9FqBttq5MD6dNBXr0CDaQnRpAGofCZedIkOI0ihvb5oKx5BO0YkGi93M 6J6/93aC12nGEgIeFEQHZgrqJUyps1E5zv3iBnquNkbiv6otXhu4m/5n5309KE+gjwnH JAhCPjprCziSUjxMV1cNlYSWcx7gmCpwlecQl5lWA9PCSaZm3Ed2/WnUxlV3tZQCIqcs CE8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J78iIrV/uBjFzK3bTpbLy3S7PgpqgxUhkktjGy5U398=; b=kMuOqDrJMplov1zd6MUNljjMK1ahONjpnDhxP8twaf9z+eyNb1Tkh8GwzRGajmdMbH m1lXEJ9VkFmYcxTNaO3JcBoUztHq86U8q0gzwK+vLT9iKM0LxU5G0+/+X8NwEdLZnN80 00x0vdOzLh5LLSsVDAYSpuY3tYjkAR8AKv/RWPq/7F+VPv6hx/y2LbG2IPkVTdmBi8p/ eRRDs0UhR4WQSdLFYdrHaT3NeNt9qU+FUnohVCYaWRXTnhcKtEBNHS7mcfqbvRAVWQOd /3Ardqd93XGFsX5CXL9JqD2vN4+qTfjj7U+BGFzbGBddznMVbPR+UeifTuNsHjSRVThg y90w== X-Gm-Message-State: AOAM530oXhc4Ng3DdV4E22ka9uDRaRhiZDlP+BJbZZCgJKiDb06BvQX0 bEguZbqGTzSy5f/FtSZoFpYGpKOgIkWc1g== X-Google-Smtp-Source: ABdhPJz7Qfcl+U4cOLwZOZvplv2iGdDygH1i68OQUvU45yckLM+QNmyrJW0YUKL0+IQuCIlotmiw3g== X-Received: by 2002:aa7:8591:0:b029:302:e6e8:705 with SMTP id w17-20020aa785910000b0290302e6e80705mr3613749pfn.5.1625077953046; Wed, 30 Jun 2021 11:32:33 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 09/28] target/avr: Mark some helpers noreturn Date: Wed, 30 Jun 2021 11:32:07 -0700 Message-Id: <20210630183226.3290849-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Rolnik , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" All of these helpers end with cpu_loop_exit. Reviewed-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/avr/helper.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/avr/helper.h b/target/avr/helper.h index 8e1ae7fda0..4d02e648fa 100644 --- a/target/avr/helper.h +++ b/target/avr/helper.h @@ -19,10 +19,10 @@ */ DEF_HELPER_1(wdr, void, env) -DEF_HELPER_1(debug, void, env) -DEF_HELPER_1(break, void, env) -DEF_HELPER_1(sleep, void, env) -DEF_HELPER_1(unsupported, void, env) +DEF_HELPER_1(debug, noreturn, env) +DEF_HELPER_1(break, noreturn, env) +DEF_HELPER_1(sleep, noreturn, env) +DEF_HELPER_1(unsupported, noreturn, env) DEF_HELPER_3(outb, void, env, i32, i32) DEF_HELPER_2(inb, tl, env, i32) DEF_HELPER_3(fullwr, void, env, i32, i32) From patchwork Wed Jun 30 18:32:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3EDEC11F65 for ; Wed, 30 Jun 2021 18:42:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 98A43600EF for ; Wed, 30 Jun 2021 18:42:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98A43600EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfAQ-0003MO-Hk for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:42:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0n-0005B3-Ec for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:36508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0k-00021T-Ry for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:37 -0400 Received: by mail-pg1-x52f.google.com with SMTP id e33so3206703pgm.3 for ; Wed, 30 Jun 2021 11:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pCw6fLSKCEavs1htLRAjDwkOxh3efrl1ZEcFJiTTMvg=; b=T9pCnmwcoDUHtHGFeDqFXX63m+YAFJJHtY9WnHm0bMMbojRAxQo8bKSYd/QwEiM9N0 W5rLbJkYHPJmlmUtlzf9xd1agh8RzedxsnpvQ6dqtgJUTBij8VDpZJ0sM9rSXCjbgkMP MGVdD+6pbarLJnZ9OiUmBZZHP5ifwcc+IqGIIr+Jo90BKrum9GyBE7MPfFk6ZtcINKJB +TNPyHRNxxkyHSL9xKSjE1KlglwB2cyNLVphrypv+G/71KBUik0vlyRnZVHiib5guReu 8vDKf979mTU3jSlWjkldTt1pJz4gCVjJj42t4kFOubbOhtDEJf1cjojyUw6heSLuio5+ 2FMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pCw6fLSKCEavs1htLRAjDwkOxh3efrl1ZEcFJiTTMvg=; b=jDW/WCa+0MQf0NWj6GJrbpQIoybUKbSYqgouNEyz9jUFX0Jz8zO7CABCxB3j6gqn3D ic4xkb86jAkjV5yEEyF88V3piwpzAU3DnVpXbVRKQzHAZxAeRkDib1DKyK6KMqsh+y1B Z7g4n2hfVB1OI7M04YfpEz4NrnLym/EVlhspYW0EEGV8vNQM3FzXV5lL/jGNMthn6saS TKnrGZerCBslwas+FElutVddmpIueYEAN3WNtFFDdM9WbVn0ZSUxmt6+c6Egc8nY+2J1 k2HIoNuHfudsykSGPGinSeUQRpcHoKqFKimABt8MR6pLWvmCs0dQYta2JYUdG5XidCWC 2nbg== X-Gm-Message-State: AOAM532DAm+kFm5zqve/Z1gcNwhzSEYU06CHal2+xemEIaLVjhqgrdhd mbLF3iQ8DXIjOy4a9/hh5q28uIAbEu92qg== X-Google-Smtp-Source: ABdhPJwtE7eAjcFvl8FzvVWCxh08Z03Pv8Y1deQEsZ3ipTYNfd8ZPDEkemMKU0RjJ+3sAjDFk5Utxg== X-Received: by 2002:a05:6a00:14c4:b029:303:fd5e:3800 with SMTP id w4-20020a056a0014c4b0290303fd5e3800mr37610153pfu.41.1625077953593; Wed, 30 Jun 2021 11:32:33 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 10/28] target/cris: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:08 -0700 Message-Id: <20210630183226.3290849-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The test for singlestepping is done in translator_use_goto_tb, so we may elide it from cris_tr_tb_stop. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/cris/translate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 4cfe5c86d9..e33a3bb326 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -482,7 +482,7 @@ static void t_gen_swapr(TCGv d, TCGv s) static bool use_goto_tb(DisasContext *dc, target_ulong dest) { - return ((dest ^ dc->base.pc_first) & TARGET_PAGE_MASK) == 0; + return translator_use_goto_tb(&dc->base, dest); } static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) @@ -3235,8 +3235,7 @@ static void cris_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) * Use a conditional branch if either taken or not-taken path * can use goto_tb. If neither can, then treat it as indirect. */ - if (likely(!dc->base.singlestep_enabled) - && likely(!dc->cpustate_changed) + if (likely(!dc->cpustate_changed) && (use_goto_tb(dc, dc->jmp_pc) || use_goto_tb(dc, npc))) { TCGLabel *not_taken = gen_new_label(); From patchwork Wed Jun 30 18:32:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352689 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AF21C11F66 for ; Wed, 30 Jun 2021 18:39:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5046761420 for ; Wed, 30 Jun 2021 18:39:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5046761420 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf7U-0006NE-80 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:39:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0o-0005EN-K0 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:38 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:37397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0l-00021f-7k for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:38 -0400 Received: by mail-pf1-x432.google.com with SMTP id 17so3087680pfz.4 for ; Wed, 30 Jun 2021 11:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cH+sdopDqg3AA/XmKjvzj97BFIKh2FfG1/i/yI9Y2V4=; b=nZWpNRvmJr8B0KLGBlmol8zFkgwK9OeS5n1S8HpnfR8XZtneZQMeYlm1xQVmWhTSDX nn78T4xFepqoJfUdbrxjRgL1Lgy9Xi8iR+dIkqeErBZpTetY8jwTG/qWfakhxadbVqUA gbkLNbHMpG83++qabE6HHlcfT2K84ryb+563YjwHRDhMtvpXV47GpdWcBW73Xo17JfZI ziZT1KOWn+eQBf8LxccUQ68S6rLFX7YD9hysqtjVR4FJvuU0udwtjdNMAkj/LvPKYH43 J5nnFcfXnZ5HFbyvZDuNKBqMCS6CLSC/HXT3j4AFkSmHFICgiIiay9lugaDnkfrgiDp1 KcAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cH+sdopDqg3AA/XmKjvzj97BFIKh2FfG1/i/yI9Y2V4=; b=bGlliZcukAPFCbyL54c+qot7JN1/dmgefhH7lIN5KXa8racDF7K01898uIKNIY+rm6 xQnuzagvodEGgPPsi/gMm6DSDpVjLdtHUN8FJSwaVGFZNytGZtfmpyZLg6AKLcaU7zPm b6yC58kTsJDDLFnlEfXD854kMlmJYOTOlE4THbSvA3VOyM1omFLDZorAqitYqGlAVqnr NbhfBPthtULdWxd1GvWAwaaJmhcrToFFxEngxltUFcpCH/DVwhbC2QZA1dJ52/Not5bN KZk9P9oPPFXJK42DggdHgYIXAQOpvC+cXir8rXpaDle4ilyTzQoc12LfghbSsM7zzQcV myCg== X-Gm-Message-State: AOAM533LgJ5elUDKkbgbs9YphM+gSwh62mbzSTiqDa8GDvjlSUBYsYuw r90Tg2vhrbVW8mZdBka4OXVyQDMUbqz/Kw== X-Google-Smtp-Source: ABdhPJwWzfsFbvrZzJ9WIjV8/KKmRkuiHlgRGxT9AYky4ZNLUQOR8+6BQlsB9bSJVFg8ZvOyPlvfnw== X-Received: by 2002:a65:5889:: with SMTP id d9mr395398pgu.410.1625077954111; Wed, 30 Jun 2021 11:32:34 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 11/28] target/hppa: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:09 -0700 Message-Id: <20210630183226.3290849-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/hppa/translate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 64af1e0d5c..952cfe09a6 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -817,10 +817,7 @@ static bool gen_illegal(DisasContext *ctx) static bool use_goto_tb(DisasContext *ctx, target_ureg dest) { - /* Suppress goto_tb for page crossing, IO, or single-steping. */ - return !(((ctx->base.pc_first ^ dest) & TARGET_PAGE_MASK) - || (tb_cflags(ctx->base.tb) & CF_LAST_IO) - || ctx->base.singlestep_enabled); + return translator_use_goto_tb(&ctx->base, dest); } /* If the next insn is to be nullified, and it's on the same page, From patchwork Wed Jun 30 18:32:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9C38C11F65 for ; Wed, 30 Jun 2021 18:38:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8197A61419 for ; Wed, 30 Jun 2021 18:38:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8197A61419 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyf6m-0005SD-I8 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:38:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0q-0005NZ-SK for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:40 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:35451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0m-00021v-1V for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:40 -0400 Received: by mail-pg1-x52d.google.com with SMTP id v7so3207713pgl.2 for ; Wed, 30 Jun 2021 11:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pZJo4XGYgbkEYhOyx8VRv2KPcpMmqSnPo9gCdL2MX1E=; b=YezUgflhWFt0Qe4stCT2eaMShNkYH7l1CHtm16KxDiXgO3YzbIPVVxzoeOD3CtanzO eaw4UuGL4u5d1Gec1+YjRBRcjoov9SUl7IQN4QKiLiVdjBRiK9+TG033GrvcZ9N1ipB7 8PeSVbwDU2zRg7z581oYPFmojor00jDmsr55oIIFTZJXfEd7CKnwWNHmhlRE6Bp4r3b6 52DzD9aWGXBUgYM5tBAoHqMg5u0aVfxg3fLqnpqhH4YxmD722Qz4dNIa9KLcK3emmKN8 daQfhGWfeLJz5Yn6dGcAccDIsfaqUGsTbBvj303ilCxhoo2vhrL+LFIExq8HguEUJD5x 1p5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pZJo4XGYgbkEYhOyx8VRv2KPcpMmqSnPo9gCdL2MX1E=; b=cd8m3dAuTmLM1FbpJwa4JpK2t5GXVkrl8XkHFBSd+urokw1pZ9a4EuOJ+fSC18dkkD pQ/AERH4aA7UlbH+jS8P1jOTuMjI4Jih5PGu7pfciM0HudoUfas+kF+n88c5N1cllaBu 7ms3x3QsExJgO6ZejjarBetSeK4I5q+WpAWj7uHkxn7+bFC2Aq2q8uMTThd/l+N22iHV pMmWrnu0TUviKiNeJJ5h1g4kOIxJEGp+MjLSujf8MkGqP0BjB8raKy05l7CqtldxHSvc 4Oi25Ai2O95F/cZuI4VcaIevLEkL/GIgjSctSPJq9RBDE9z0Eo6HtOVX4Ns9CMrXfjQV h2NA== X-Gm-Message-State: AOAM533+bF8tZM7a1DT1V8BgTJkLV9fK3ebLSnNtZVxuv6KEMkdHIHuB P/Li4ciNPaAW2waCj5VUV5HxPI7rM0139w== X-Google-Smtp-Source: ABdhPJzt42rdOz+OAJF+muvXO03NkQfsoqo3HZ+YTZazvyV1Q3HKMZhmUlQmMb3HY6g004C2s3TeDw== X-Received: by 2002:aa7:99ce:0:b029:30f:7bf3:594a with SMTP id v14-20020aa799ce0000b029030f7bf3594amr6020906pfi.34.1625077954842; Wed, 30 Jun 2021 11:32:34 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 12/28] target/i386: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:10 -0700 Message-Id: <20210630183226.3290849-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Eduardo Habkost Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Paolo Bonzini Cc: Eduardo Habkost Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/i386/tcg/translate.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index b21873ed23..eb9ee0296f 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -2314,21 +2314,11 @@ static inline int insn_const_size(MemOp ot) } } -static inline bool use_goto_tb(DisasContext *s, target_ulong pc) -{ -#ifndef CONFIG_USER_ONLY - return (pc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) || - (pc & TARGET_PAGE_MASK) == (s->pc_start & TARGET_PAGE_MASK); -#else - return true; -#endif -} - -static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) +static void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) { target_ulong pc = s->cs_base + eip; - if (use_goto_tb(s, pc)) { + if (translator_use_goto_tb(&s->base, pc)) { /* jump to same page: we can use a direct jump */ tcg_gen_goto_tb(tb_num); gen_jmp_im(s, eip); From patchwork Wed Jun 30 18:32:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352699 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5904C11F65 for ; Wed, 30 Jun 2021 18:43:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69E38600EF for ; Wed, 30 Jun 2021 18:43:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69E38600EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfB0-0003pq-ES for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:43:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0p-0005GY-4j for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:37715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0m-00022Q-Sw for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:38 -0400 Received: by mail-pg1-x529.google.com with SMTP id t9so3196981pgn.4 for ; Wed, 30 Jun 2021 11:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+Jf1hfNBd506pP5UotsDrbYdrcf9l5zM5YtUqqOrZ/M=; b=U59gzQAHTzh+//CyTQHvff5KXBoJ9wsWtQhtp8j4riQi/H1ZfbP50QZJyRjX+h2JJD +fKddZU0NtYQ+WfCoasWpDXDdutZKwaYBN5PaJvO5i2Rk3F1xgvKcgBMzJkp/ieo68R8 AuwXOeh/eKUm0ir8s271DZLIbJSIEgAvl89kgJ1NwB1PV598Ez61ZdwyKR8AZd9M3VYJ 2O5BlPQ94tbXm1qbldZIcxF2MbpfaOeloX7DGvsMszzEURhs9c4AH7ZuBCNJngAr1HBz VEuYOc3ClbrEzhtuqGF1Tb08p++cRF1L0W1+aXZEvSDck/3+IIV7k7/azfD+r8DYkpJi lu/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+Jf1hfNBd506pP5UotsDrbYdrcf9l5zM5YtUqqOrZ/M=; b=sZZXaO551wi+cWW57gIECktDUF4yiiV+QVYGUTnTqGmN+sh9ynjXfyu34nJKEPWtZt 2rgPYCCUMOp/Tcn0FqacAkZ46zO+cQQD7hZdHzuL2NOaJNe0ui7PdmBjRF6ZaUuVZCXe CPMl06FKbUcpJM21Q7LUzIvqtZr0ktfJdopEPE/el2JhHlEaTxsOhNT0a8RQ5GJ9znTg OsIzlmqL7bI2u5gLFNIItPuyP6Q2mzxzrjgPxF/XVLze4B2adznJ5oanXrg2Z4ot2EGC eVMcVyOnty/9jiY37y6kj2IVfezn8q+LHS4JIja6wN0S/+djQZpNgsMptREoEKkCfjBb lDDw== X-Gm-Message-State: AOAM533YSlWTdioncG04zKuI87DmzYRbqSLNIIgNXauTtW9wIAv/Dywq s/6q+zGOmUPzn7XL/JoapWzwQSskCo6NXw== X-Google-Smtp-Source: ABdhPJyX9AAsmnZ4OIM9XvaACixSKbkLQqFqKDeYO8ALlwL6LA0tjP9wMY3yOWzndddEzdy6KVcWrA== X-Received: by 2002:a62:b502:0:b029:2ec:a539:e29b with SMTP id y2-20020a62b5020000b02902eca539e29bmr37269229pfe.37.1625077955432; Wed, 30 Jun 2021 11:32:35 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 13/28] target/m68k: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:11 -0700 Message-Id: <20210630183226.3290849-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Acked-by: Laurent Vivier Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/m68k/translate.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index f0c5bf9154..05b96fdda7 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -1520,16 +1520,6 @@ static void gen_exit_tb(DisasContext *s) } \ } while (0) -static inline bool use_goto_tb(DisasContext *s, uint32_t dest) -{ -#ifndef CONFIG_USER_ONLY - return (s->base.pc_first & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) - || (s->base.pc_next & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - /* Generate a jump to an immediate address. */ static void gen_jmp_tb(DisasContext *s, int n, uint32_t dest) { @@ -1537,7 +1527,7 @@ static void gen_jmp_tb(DisasContext *s, int n, uint32_t dest) update_cc_op(s); tcg_gen_movi_i32(QREG_PC, dest); gen_singlestep_exception(s); - } else if (use_goto_tb(s, dest)) { + } else if (translator_use_goto_tb(&s->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(QREG_PC, dest); tcg_gen_exit_tb(s->base.tb, n); From patchwork Wed Jun 30 18:32:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352719 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A211C11F65 for ; Wed, 30 Jun 2021 18:53:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A741C6142E for ; Wed, 30 Jun 2021 18:53:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A741C6142E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfKo-00047z-Nb for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:53:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0p-0005IS-M9 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:33529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0n-00023N-6G for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: by mail-pf1-x435.google.com with SMTP id s14so3383803pfg.0 for ; Wed, 30 Jun 2021 11:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lDoRcLaC7/1E4QoRTMLY4EqhrZiViuK6qiqJLkoqpZM=; b=xrF/rEgIZ8k3GoWRFbCJDS34TAkZPl/yEBkbSTjTBDYPIvkS7kO5UwjbJoX3wh/42i yzmepRrLiOEvIphmiYaPPNNYmhkrdXpjCEH4JnI8nyQuvrtaDjlmPan5rh40cG5RZZWK 36qSeraJ3+ed2WLjRm8S2y8JzWuNg4PqcOGSPZ1duRy0kQbHJEUPJCJsdynGgTHAnWe4 p0ZsLiX3a5rkRn8MOTFeI7KePgc2W4R/7G7WI/4XvnTky/Lq4hM8gapomPQMW6BKybsh z7fxehJkcDK0LrPgXkR8b3++tFVlTbRJaa9Jp0Mz8xjlFpm1kHPFIBuub175MUmQsSYP qK9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lDoRcLaC7/1E4QoRTMLY4EqhrZiViuK6qiqJLkoqpZM=; b=Y1ct/R9s0Pbq/QhK7/hDPOWxJ5JiHttg6QefCUzJ5oPm5cKXExc7NyncYGejXuvoG5 LalZp76UP5WhuW3Q4cZ9EGmtFUfDmfA9yEYYQgDTD6Y1pIXbQU6yGPExnQF6HAoiIzzt g0VO0tFssqo0XoUfp0MDMT08u/A7MYpHrYPEJPYU5KztiqyBSAryesbQjdb39kboJ8/K HUOX0zhh3IEmLryU74Qdt4/ZecCfRdrb/jLvkLESGrUHknilfahRYOtLB9rcm3gVVr+3 frnTpPKgNbBtXu6jSnwmyJRdfHFu9TenhcRBg+uiC4mvNfM5cHYWrl57aOTkcVKlHQ/v YGVA== X-Gm-Message-State: AOAM530TXkrhMfhXpiurYCWnZTT+RN4V96zWBxCMUNOWUDhXD29KRkdu QZPGVgo09QW2xnrqaXsL+HUdsu/V16TecA== X-Google-Smtp-Source: ABdhPJwH2zm3FqA+kDgWW70vrV1ti7kxWzO+gJThOcaJR5XzVZ5+VRY/ePPpRjW2XO2Hii+uob7wlQ== X-Received: by 2002:aa7:828f:0:b029:200:6e27:8c8f with SMTP id s15-20020aa7828f0000b02902006e278c8fmr37139676pfm.44.1625077955986; Wed, 30 Jun 2021 11:32:35 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 14/28] target/microblaze: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:12 -0700 Message-Id: <20210630183226.3290849-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/microblaze/translate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index c1b13f4c7d..b753f080e7 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -125,15 +125,6 @@ static void gen_raise_hw_excp(DisasContext *dc, uint32_t esr_ec) gen_raise_exception_sync(dc, EXCP_HW_EXCP); } -static inline bool use_goto_tb(DisasContext *dc, target_ulong dest) -{ -#ifndef CONFIG_USER_ONLY - return (dc->base.pc_first & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { if (dc->base.singlestep_enabled) { @@ -141,7 +132,7 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) tcg_gen_movi_i32(cpu_pc, dest); gen_helper_raise_exception(cpu_env, tmp); tcg_temp_free_i32(tmp); - } else if (use_goto_tb(dc, dest)) { + } else if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(dc->base.tb, n); From patchwork Wed Jun 30 18:32:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFDF9C11F66 for ; Wed, 30 Jun 2021 18:47:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B87D61285 for ; Wed, 30 Jun 2021 18:47:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B87D61285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfFE-0002og-Mg for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:47:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0q-0005Ju-1K for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:40 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:41920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0n-00023V-Ns for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:39 -0400 Received: by mail-pg1-x52f.google.com with SMTP id m26so3178534pgb.8 for ; Wed, 30 Jun 2021 11:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1HJD3JCb9LiRtjNiA/n4zNuSXKpMe99KSR3Hi1PuyQo=; b=B4/45vN1alKBnuNUinuR/wim9yW576/vzDaJwEjBTQYfzycPESOo6eod6Dc3Ws7P29 +GTlvYwBQwkyzPgJbt0D/ayimzSpUIxOkyY0+93cgBo8p6sxZmMOM+w+OIszoZubOHCz wRUUl+Oy2RDfrkMNqXR5/8MweENDB2BOujfTpTlFMIdAfYZ0TSB00E6WikdL5w3lDMIm HQMEYNiFFzecbjiN5oUOIBXXA2dtWj8abchnrDy1dHsRWLxKtO2X68eQLvUxoFb1AAB2 HA41381pqzwktExeKIrcFtHkvJELFwsKwQ/wrWAZIwlO3d5qdbwN/0sK6fI78lcQKonb KwCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1HJD3JCb9LiRtjNiA/n4zNuSXKpMe99KSR3Hi1PuyQo=; b=hKVgEQ3UIkF1U7bx7ElkwiZycgNIxd9NzauSlSltzjbUgnKD+KM+11YDhRGVyYqt5V GytJ/+CUA4y2i+cBi1genCsEAi8BArhFgOd3tJ6e48hCuVd12MtVn1S9rSe6ltzML9xr nN2D38tWa5I3DE4HU+4OEVNEtLIoZ3m/IObGISvUgWbCoilX3G+faCuIdM64K9iZrhFg qjLjpSDA+ox45qoSO3Ip9hWcAu4+ax8lCFYomb420v4REaKwYCU6wDmvSWFlIt9iEJhb 1CZz2rZiTTRKjWyUcnkA0kFbCuLWDbX1+IGLiWGYlTzNSQqqYjSg4pf7CS5QF+++wIYw oTXQ== X-Gm-Message-State: AOAM531aEOndlyC8L2ALlwPitISGvwmLhmv4GX5IePKfLuAX9gbsY7I6 HbtmYk5jdgBGimMHP4+umjki+mHH2T7DQA== X-Google-Smtp-Source: ABdhPJyRBiv1PF9w7PuHnQPh4nzloDti6R6kJdhSgaxCKqun+BzdG5DlGX3YPCqr9vx285VcR9uTAw== X-Received: by 2002:a05:6a00:2403:b029:309:8a37:2d51 with SMTP id z3-20020a056a002403b02903098a372d51mr29424617pfh.79.1625077956640; Wed, 30 Jun 2021 11:32:36 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 15/28] target/mips: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:13 -0700 Message-Id: <20210630183226.3290849-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/mips/tcg/translate.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index b4a454ec09..52ae88b777 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5019,22 +5019,9 @@ static void gen_trap(DisasContext *ctx, uint32_t opc, tcg_temp_free(t1); } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) +static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { - if (unlikely(ctx->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - -static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) -{ - if (use_goto_tb(ctx, dest)) { + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); gen_save_pc(dest); tcg_gen_exit_tb(ctx->base.tb, n); From patchwork Wed Jun 30 18:32:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2FCCC11F68 for ; Wed, 30 Jun 2021 18:58:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 663B261431 for ; Wed, 30 Jun 2021 18:58:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 663B261431 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfPr-0007V0-Ad for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:58:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0t-0005W1-3x for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:35509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0o-00024I-H6 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: by mail-pj1-x1035.google.com with SMTP id pf4-20020a17090b1d84b029016f6699c3f2so4949695pjb.0 for ; Wed, 30 Jun 2021 11:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pff8c+CXaZuYQN3AC9HgnBb8y6h8lxovDgoF+viWASM=; b=RUck+Moxk5bH3lg6sK9LjSOnLcST6ee635ckGnNir+1HW6yM6NWBMQ+BSm2HVdgWiG ged+KzAZ70Ipi7b+IVa07cMv9LV4Fnv6lONyAoJve+vNTKlUFiC+U9fkxAj2ZKUqZe/l dcw9zS/w2EOKLOvG2QpAiMz2tAEiEsTBdmZfOLuuFxBH4hjLOJhHiDicaIfWBUxpkXae U+LbFQEemHKmTqNIQ0pOiJngbkPARVdY7bk/Tt54sXks6avz+cGZLP2YEunTJx+2GZJ/ UHu0Jobxe6lFAoaU4CRJIFjOiuQBdhx08CMS38oON3UkYMRExRSibLKwDBceazNZPIMn ZZSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pff8c+CXaZuYQN3AC9HgnBb8y6h8lxovDgoF+viWASM=; b=KktUGcBZy26iw29c5KZe+0Tk9fguKA684wFt35KTO0zaDjEJmTBLwhMlc6NEFq2tI5 7ggjjP0aID5yodo2uuQtxjzwACmelLQelSCqKCWJh0rxw2MIJv5RxLEriIqpaHr++hdv nEYIwdv+hC6TiAlxgu01Gb+dqtKMlSWgiGH9hBa1Zaz71ACeOMB/s6C0OiVsrhjBAyOI iBcPyMuMpx38jwt0vDsepudMedBpvxyG7eg5C6rYuDdO6k42eTskjmK2DtPkjrHEG91w TbkJ/aJbgkJLAucd/UEs2xkNFQa/Yqvt/wT+UwXWAMjd8UDQRaf5DctEfca2jiCBTpOB YEeg== X-Gm-Message-State: AOAM533x5cfEYsmddpgGkWgHwOkqyA/Go5MEn1X1i3lxKkYC7fug0ot1 x5F+V6D6lNT8wCEqM0EjS9y1p7vWM5ENYg== X-Google-Smtp-Source: ABdhPJyTebglw65L6Yvk9kOonE6yUwOrbw6nyk+rGrzIbtlJSrCwjCrn8RxdvHcGZKSEPmyu85GE0g== X-Received: by 2002:a17:902:b082:b029:113:e50d:c404 with SMTP id p2-20020a170902b082b0290113e50dc404mr32923002plr.5.1625077957259; Wed, 30 Jun 2021 11:32:37 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 16/28] target/mips: Fix missing else in gen_goto_tb Date: Wed, 30 Jun 2021 11:32:14 -0700 Message-Id: <20210630183226.3290849-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Do not emit dead code for the singlestep_enabled case, after having exited the TB with a debug exception. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 52ae88b777..17e79f3de3 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5030,8 +5030,9 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) if (ctx->base.singlestep_enabled) { save_cpu_state(ctx, 0); gen_helper_raise_exception_debug(cpu_env); + } else { + tcg_gen_lookup_and_goto_ptr(); } - tcg_gen_lookup_and_goto_ptr(); } } From patchwork Wed Jun 30 18:32:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F3EEC11F65 for ; Wed, 30 Jun 2021 18:42:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AC4F61420 for ; Wed, 30 Jun 2021 18:42:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AC4F61420 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfAE-0002uR-Ey for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:42:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0r-0005PF-Bt for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:33523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0p-00024V-4n for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:41 -0400 Received: by mail-pf1-x42e.google.com with SMTP id s14so3383874pfg.0 for ; Wed, 30 Jun 2021 11:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EuLUTgtrIq55E1MmI7/EbN0xfKvn2I2h2MjVLgAIedQ=; b=UrOWh+BK3L8ETRDsP8Ny8m/0mTdoevAuICl3w6B7WefVtUFRDoawh8Amb81zHoohfY 9LwI+4N0jm2IWPzZJfXQdPX5o1P8qYOl5HAg/zqmyxhuJOg9Joavv0upY9+ls/YYm749 7r/KGdbr6PcQ6umWu0ZxG91l/NHCVQImpTKUGrR+xPC/uozb4n3Yj4NuhrnhME+ZAA8a IRH40ySPVuQmIsXwkXDLBSidRdEWtJ1apzFRgjWb7D8NK0Y+FfnbB7QuAY5ek04ZZDrO BHSifbV5MUatkfpmHNhsBheiqFwBxHPiHb8AAjYcYNe+lnTq8AKICwcRLeOliriivJkb uXEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EuLUTgtrIq55E1MmI7/EbN0xfKvn2I2h2MjVLgAIedQ=; b=fn246X42lWFPEAF53RNfDsRbDIVWTmNaS+tGncOVnIw/iFPVgZCK6El9hCJ1rqq1BA QZakMB4lTM8y9BVZ07USTFRcpxSucvV+ady6TUIBWBTz2ELsPuSysy4/UobZ/BXGCb49 t5+RJSzr9Qg3JeO+oyoz1MQsNzhuS7n0Hz1GhO3Q0Q9eSOSm3V1qREmYJ7G7pjGd/nrr h7KoAIoSojX6tFIpkgPvIMbxfrARbkeGkrHQZIxlO/CPwXpdK0yO6n17HQqhdQVFalna AD/QcVFirpd4NDiVdX0K7EsPiXPr+N6lU8F8dLH82cwYCuINy3v9mUOoeRkDqxdO8nzQ sdkg== X-Gm-Message-State: AOAM531x0IxxY7zCKiRKvZfXd7OhHimzlioOBB6UdcCDqLJh9gBFM0NA Nz5BuI4jXSr17+hMgfuF0Q+bRbyLmf8UMg== X-Google-Smtp-Source: ABdhPJxTaYeqW6CSS6EOL2pnGJiC/BmH8PA9no6iq2yte8A3p1jrdvggYX16iL5hl37cubqn9D12ZQ== X-Received: by 2002:aa7:9a5e:0:b029:305:5d37:7622 with SMTP id x30-20020aa79a5e0000b02903055d377622mr6682982pfj.2.1625077957884; Wed, 30 Jun 2021 11:32:37 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 17/28] target/nios2: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:15 -0700 Message-Id: <20210630183226.3290849-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Chris Wulff Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/nios2/translate.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 930f3d3395..17742cebc7 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -150,24 +150,11 @@ static void t_gen_helper_raise_exception(DisasContext *dc, dc->base.is_jmp = DISAS_NORETURN; } -static bool use_goto_tb(DisasContext *dc, uint32_t dest) -{ - if (unlikely(dc->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (dc->base.pc_first & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_tb(DisasContext *dc, int n, uint32_t dest) { const TranslationBlock *tb = dc->base.tb; - if (use_goto_tb(dc, dest)) { + if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_tl(cpu_R[R_PC], dest); tcg_gen_exit_tb(tb, n); From patchwork Wed Jun 30 18:32:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 699D2C11F65 for ; Wed, 30 Jun 2021 19:02:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BA5F61435 for ; Wed, 30 Jun 2021 19:02:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BA5F61435 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfTD-0005Bo-6O for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:01:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0t-0005WF-5b for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:45759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0p-00024h-MT for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: by mail-pj1-x1036.google.com with SMTP id z3-20020a17090a3983b029016bc232e40bso1983305pjb.4 for ; Wed, 30 Jun 2021 11:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=PyIoG7fqNcEfFFQ4gNjJia2QzE6oMaOP97nFiokhYPZyiEz9+WinGExIM0Pxv2iWY4 0eRWmX+YannV1JkCm+iWDO61JsSo0eEvjlxsg3yWd4AlJ3dKWVZHaPJrUhv9wKqHR2rH 9SGi6m/7AHKcBLiWembfrdkutc1TKuhwnRWE9jidUdA0ghmtr6WgYlX/isyeMC9ahx0S UZNfllpFq7bcfYu0bDrM9DjIxOz+92Q0KFPACUCjcnSLW2X27lCYH+7iBjScX+ZE+Dzn aUgza9k6z1eYXPOu/diW0UhE23qN4d3uOKT6RL0NNVAdR/iBJc0HfARzDkW6lTE2qPXo CbDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=EIzLFvcdeL5Kywz4ksZTQ3UW6IAZ+jZLSEEdHH6FYdtWMd+9uiw74OcHQ+u9KAjack C26SqZMfqvdMgFTLF+KwcqtxYG/5rSbflkKffnc/lT/v/5x+r4tyDbpoOI3JJM9ryv+l O+E6dreMu5xwgW1s3U1rh1l+3ILvTIHiIU7tqy2SydhE7bF8TAFBabFsHj4mzsKG7kd4 f6qIXQKoJqFCq1h/H2bL6DgAqmOekOnY+J706virDAQfrm9QgOHdO+ppV2DP7QUMF3mX zAThamJhMWRu7wYXdymz/Y4Fm4cMiXsbuO6VaQka3gORD08podICjTt4ERywLsaMz57W oEZw== X-Gm-Message-State: AOAM532OmSWXA+42u5u7OZoq4dfbPwgJdbTyCDY21VhHiMzas4mlP6SP z0194Zmpp7GgNnIEi0M/nOkAL0llXOLBGA== X-Google-Smtp-Source: ABdhPJxK6FxHXFjXBg8VQI/1TYPsVXtfOB3dbQPM1rClB07JjUqd1BDOk6ycXVTTOZcbkzTxebDvxQ== X-Received: by 2002:a17:902:8ec7:b029:119:a15f:3a1c with SMTP id x7-20020a1709028ec7b0290119a15f3a1cmr33701713plo.48.1625077958425; Wed, 30 Jun 2021 11:32:38 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 18/28] target/openrisc: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:16 -0700 Message-Id: <20210630183226.3290849-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stafford Horne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reorder the cases in openrisc_tr_tb_stop to make this easier to read. Cc: Stafford Horne Signed-off-by: Richard Henderson Reviewed-by: Stafford Horne --- target/openrisc/translate.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index a9c81f8bd5..2d142d8577 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1720,16 +1720,17 @@ static void openrisc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) /* fallthru */ case DISAS_TOO_MANY: - if (unlikely(dc->base.singlestep_enabled)) { - tcg_gen_movi_tl(cpu_pc, jmp_dest); - gen_exception(dc, EXCP_DEBUG); - } else if ((dc->base.pc_first ^ jmp_dest) & TARGET_PAGE_MASK) { - tcg_gen_movi_tl(cpu_pc, jmp_dest); - tcg_gen_lookup_and_goto_ptr(); - } else { + if (translator_use_goto_tb(&dc->base, jmp_dest)) { tcg_gen_goto_tb(0); tcg_gen_movi_tl(cpu_pc, jmp_dest); tcg_gen_exit_tb(dc->base.tb, 0); + break; + } + tcg_gen_movi_tl(cpu_pc, jmp_dest); + if (unlikely(dc->base.singlestep_enabled)) { + gen_exception(dc, EXCP_DEBUG); + } else { + tcg_gen_lookup_and_goto_ptr(); } break; From patchwork Wed Jun 30 18:32:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D66F1C11F65 for ; Wed, 30 Jun 2021 18:56:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9676261435 for ; Wed, 30 Jun 2021 18:56:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9676261435 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfNV-0001Rx-Oj for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:56:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0s-0005TN-Bv for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:44004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0q-000259-6F for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: by mail-pg1-x533.google.com with SMTP id o18so2557592pgu.10 for ; Wed, 30 Jun 2021 11:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CGijMJQVEM12PQG7khoLYEEx6Kld5VypBBc7yQ7jwvM=; b=VTYPQBjK6p7DYGo5l6qZl0gdVcIQLlyb8ZC+vJvs1a7w+LvQJZRcjZKhmiraFvfCge 3qRCpYDKtOHfnWQked0FrdlwPl6xqB6IIMAnfOYbqZh6GqTHidT3rgCZ2vI7HY+GQsqV /AXCi/ozG2ug0csPqsWV9j8Vy4f+XSHahHuO5GuAF7UWtFf7c6itaVc1wVBy+Vxs7STg dyzI6PhlGgeU0OrzZkJyPTgS/XTszqBt++MIKUuL7Mshd0foS+spLNh3QpolJuDZ5q9w ro/C1m1XY7cFBlzzViyXYhifgEzRAVgp/CfmdyfejPONyXrA01jfoqEUyXW8/6Rsi1pr A5Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CGijMJQVEM12PQG7khoLYEEx6Kld5VypBBc7yQ7jwvM=; b=tRUscqEDfKuhYc2avK407SILJEOj9sRExdt35fIAjNfK8T6F4Xv8uBe9kPufN/BASu To/bGxkoFijxFeaqjcgm6H8Q/oGUjJi8u4TDHtcVKzE5eRbOlx0nmrRjiKjrSQ9ja5kW kk8pfVa2x1kfcz6fd5Z8iioZzXoGVweVopxx0jX3h57m/UGGPD8s8pFRPVDgDyvTyht2 TWS/Seh4wXIEdGYJpx+r/NKqq/G2vyLbyNmDcxaDcj4Qf5g9zl6v3mSYwggx5oh/dYnN NyUPzS+s2nIS6jIgOy3X0rH6cJk4g20LGs7jC6pSSD6hf7DUJTyqjarMVu/UgTyPwugk SF7A== X-Gm-Message-State: AOAM530nSiBWkHM+BPzFibZm4eZbl/FfJd5C45FBBA7ef0iNbS8/42xU 1u0s0Wh8fJxQ/kYQqFciQt8pjhKXgbikNw== X-Google-Smtp-Source: ABdhPJyljVy5vXhY/DG+2iQ6xvpkzXxkciE9Z4E9mr52VYAoEBF32G1p6FtENeo5BZdkY94PBsu0MA== X-Received: by 2002:a63:dc06:: with SMTP id s6mr35787279pgg.39.1625077958903; Wed, 30 Jun 2021 11:32:38 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 19/28] target/ppc: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:17 -0700 Message-Id: <20210630183226.3290849-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luis Pires Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- target/ppc/translate.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index f65d1e81ea..0fb09f2301 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4302,15 +4302,7 @@ static inline void gen_update_cfar(DisasContext *ctx, target_ulong nip) static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) { - if (unlikely(ctx->singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&ctx->base, dest); } static void gen_lookup_and_goto_ptr(DisasContext *ctx) From patchwork Wed Jun 30 18:32:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 364C9C11F65 for ; Wed, 30 Jun 2021 19:04:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE7986145B for ; Wed, 30 Jun 2021 19:04:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE7986145B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfVh-0000m2-S3 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:04:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0t-0005Xg-JU for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:36505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0q-000269-Nl for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: by mail-pg1-x52b.google.com with SMTP id e33so3206977pgm.3 for ; Wed, 30 Jun 2021 11:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=GdyoU+pDjgC5vaOIFMPFPUzeA4XDK1U2IbSm0CjZKckHXgoDFxl87b2v5PfcFyMzGv p4GEg5P117AM8ysRPeVnZKuLTOoynPSxIjylJYdkdobwd40J8ApFLpdCvyCSL5fQcUV4 8siXASKGrDvwMb3tU6YJvPsdkK7UC3hwLFKklvaDYyYUun7PVrYV4by1oQEfED5V74hy 1lgmOfm3qMJQG4q2qHtcAEDztAFx+BwX/kFDV00zIeS/SE34N0OisOl44IAwVwVTckP8 PcKYdpxBLwGRBMi/LBN0K6ePDsjcSQHVoa7rJ2VVcSTtTsZyhvvyar8U1oWjNCLIFegp qBEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=S6eySFVe33ItExAzEgMGOrf/IyhN7d5VWtQigYbkVTPz9N/V1hRiT9rHMQ6gz6jzWn IMrZCb17XyCwYIUKCjnSAqPjRqQf5reHlrnG0zxFKsWInI6fzs9xpuPvzGGSRxX/uwi1 SYYd4Zq0pUzA6k4/hS5urEZJ4oqjQAgpPwrfhZX8icvKlWsZ70LrgTUdVOCnFfR+rDTS wcu3Kl5VhRvtm2JEMTDki0zwWaRNWJ8QU/n7ot8maCIQtnbzcgdQapkhIiYfrluPKGNY vIlkR1xicpLExIraTakpxnLZU4TlYMtks321xFc8tRz/d9oqMXz6awGBw606pCyT2Yt/ Uikw== X-Gm-Message-State: AOAM533xN0rTVIWtr0vshNbucpIoacnpWnBPOjW69p6S1Da5OVit/5zq hWpa4iECHg1cvSsh2XQThOA5bS0dcEwZrQ== X-Google-Smtp-Source: ABdhPJxH/gRyFC0/w0iiIBZAYCZdinxvdFfiCKOWQR8ASl80QZNawjR5pkAZZyM10k6WhuqDQUWWgg== X-Received: by 2002:aa7:8d5a:0:b029:302:e2cb:6d79 with SMTP id s26-20020aa78d5a0000b0290302e2cb6d79mr36886657pfe.71.1625077959472; Wed, 30 Jun 2021 11:32:39 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 20/28] target/riscv: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:18 -0700 Message-Id: <20210630183226.3290849-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- target/riscv/translate.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 62a7d7e4c7..deda0c8a44 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -168,29 +168,11 @@ static void gen_exception_inst_addr_mis(DisasContext *ctx) generate_exception_mtval(ctx, RISCV_EXCP_INST_ADDR_MIS); } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) -{ - if (unlikely(ctx->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { - if (use_goto_tb(ctx, dest)) { - /* chaining is only allowed when the jump is to the same page */ + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_tl(cpu_pc, dest); - - /* No need to check for single stepping here as use_goto_tb() will - * return false in case of single stepping. - */ tcg_gen_exit_tb(ctx->base.tb, n); } else { tcg_gen_movi_tl(cpu_pc, dest); From patchwork Wed Jun 30 18:32:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1D5FC11F65 for ; Wed, 30 Jun 2021 18:49:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 82B8C61426 for ; Wed, 30 Jun 2021 18:49:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82B8C61426 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfHT-000731-NB for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:49:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0v-0005dk-39 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:45 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:44725) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0r-00026z-Lh for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:44 -0400 Received: by mail-pj1-x102e.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so1983238pjo.3 for ; Wed, 30 Jun 2021 11:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W7Bf8v32MRSYl5delt6pF1CYpdgvOX/1OeFQMhwwhYo=; b=zLdNxDS/9nIA/hJzfGAANmqjF72c2ANkI8RjF0uZrGy6jnhrVWcbzaPvHy8kB51ibg LLPdZgnhGa+EPCgekHtH/sOnnYlR8T9Sv8bkk3K/zVwjqxaclUa4xBFX70zVgTNHSR10 RLJV6jHx6KruEjNbRX4Ro2tJR8rZtR1rqHuq9aXZR8pLcdFl1vfav40+YAgORLW/cf7h ZFqfP1LiN5vQXNnfeQ/Ao19DiorkWHyH8flgpL1hgsfK8plpuDXL6pieyDWG5oxN9Oso Hegp4WaUfJXAADDYSZaqFCApgD1wyhONXd4kt78oYdo0Nyz46xWsccI3Rp1QyosvSZdR e5Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W7Bf8v32MRSYl5delt6pF1CYpdgvOX/1OeFQMhwwhYo=; b=Yx4zzXthQrvcxdp5OWSBpO4srfde6UMNKpmyEzvw3auIl9MuoY4Gt4+NLLUE18rKMT 1aUTKNSTkRfA55CS5dVPOX7dYIFg+MP/0kUik8Eypms8pi55H1Oc7RAXA1ZL+Nvz/3yt BDX/JAv2k3hNC6BVVJ5NtOqsnmptQmymu5qJiFwiPqUW0KDrr3pVkudu1qbKiTARGnGC nZ3rqPDuZDQZHhGa+B4Nl6mvqSPjPdF8p2YVvk3bppj+JHg4k+E6uwbeoqHvyL7GIDez q6Pkucsgk06FQjg87KEduoMzb0QvpjGC8EsdG4vNmly1djrqDyb2KAC2bC2i259PGZ/v 94Ig== X-Gm-Message-State: AOAM531v5al/CrSrvsjXVlGJ0OUjFW6Le1EyBW+1bXPUBqucd6nTlsgR 9QifTaqRou4ZJEcKsjku8tCuqq2TUw0zjw== X-Google-Smtp-Source: ABdhPJxt0M5JfOzkRL1mdYqan5E7oD6av9aMrh7MVOx1t5bJ/DmfrF5wvrnXUHKN76YkJVOIRYjEYQ== X-Received: by 2002:a17:902:7402:b029:129:aef:6e3d with SMTP id g2-20020a1709027402b02901290aef6e3dmr6593937pll.60.1625077960447; Wed, 30 Jun 2021 11:32:40 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 21/28] target/rx: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:19 -0700 Message-Id: <20210630183226.3290849-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yoshinori Sato Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Cc: Yoshinori Sato Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/rx/translate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target/rx/translate.c b/target/rx/translate.c index 9ea941c630..2443406de5 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -143,18 +143,9 @@ void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags) } } -static bool use_goto_tb(DisasContext *dc, target_ulong dest) -{ - if (unlikely(dc->base.singlestep_enabled)) { - return false; - } else { - return true; - } -} - static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { - if (use_goto_tb(dc, dest)) { + if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(dc->base.tb, n); From patchwork Wed Jun 30 18:32:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEE1DC11F65 for ; Wed, 30 Jun 2021 18:45:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78F6061420 for ; Wed, 30 Jun 2021 18:45:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78F6061420 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfDi-0000BK-Fk for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:45:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0u-0005ah-6m for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:44 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:53865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0s-00027D-FO for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: by mail-pj1-x102c.google.com with SMTP id q91so2369871pjk.3 for ; Wed, 30 Jun 2021 11:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vJrlNdqM0KKCTgAnUoRaR9ScUOgl0wituQHo+qblcXE=; b=v6o/lhw3PU34Xvm8Pccrs5MLt15WbtDw7GYUvFr7cxPEKgfvk/6notSOJk+JTma6B0 MFlnQylLGFXmBmYqbE0oQFiC5cvjRgd3CKkn3XvcFMyBWfyyWMQ9yE2/MRnZKRq8AObp PVt22RuRABUbr//Gg/h+Hz4Vwmiy+P+sGRFtZmG0ufg+7eWISoRKsYKddb11o5T2s6K1 +JY/KXM/cMk2umIyDCA3UP+eXrwxQXMmUwWIh/Wone2E3XGHtFviJpEHef2z1/V/hk1E omr6mH6KMLbJ06bAzIL3Zxg9mtJvJlVY+PRZFa4SFaJfcA3EDNBblHWjlzV9fG4lU0ly MLfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vJrlNdqM0KKCTgAnUoRaR9ScUOgl0wituQHo+qblcXE=; b=XykPN75MKZfXZutlmwoAS21RHdbEPJhu2NRQYvBsu4e+tlrQAEXQMW33dpr8EHIHyo nZWqTnnV5WnYpSddPKnXfr6dahbUEf6sSiVZ2Vy6bCmrdeEvJKJnjmz9qbyuYfaLzQbZ qGvGQjLIxcrQgYsufVhv99nSLQUvvUCVawceqYknFqc/02RO4hrY+nYnFViTuaL6HJxG YrwL9L7UpYKcOrKE+zlBVtbJsOeoy6JWPD9YCA4xHbs9AETpJAw0BLx/ae8wQntzaBiN f1ywrALdp3NzDhpolZFK1+7Pf824rPj3pwImzi9J6XDlS759oQCHwQOrs98cTCvB5iK8 6BIw== X-Gm-Message-State: AOAM530k46ZUise14/9vjCyCu/qxxtJOuEGoamUFBtdc6w4Kdztb43la nNe/9fU60GktQpOCTprhuLq0UVdx0puoPQ== X-Google-Smtp-Source: ABdhPJyMVqmOriJkmILb8aDZulRms/zvA8yEBFBm3/OSU3KT87ggc4K3zYP2BFwW7DXGo1XjkHdGTA== X-Received: by 2002:a17:902:8206:b029:129:2e87:a86a with SMTP id x6-20020a1709028206b02901292e87a86amr204551pln.5.1625077961190; Wed, 30 Jun 2021 11:32:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 22/28] target/s390x: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:20 -0700 Message-Id: <20210630183226.3290849-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Hildenbrand Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Cc: David Hildenbrand Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/translate.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 03dab9f350..117a890ecd 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -697,12 +697,7 @@ static bool use_goto_tb(DisasContext *s, uint64_t dest) if (unlikely(use_exit_tb(s))) { return false; } -#ifndef CONFIG_USER_ONLY - return (dest & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) || - (dest & TARGET_PAGE_MASK) == (s->base.pc_next & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&s->base, dest); } static void account_noninline_branch(DisasContext *s, int cc_op) From patchwork Wed Jun 30 18:32:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352715 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFF8EC11F65 for ; Wed, 30 Jun 2021 18:50:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95D776142E for ; Wed, 30 Jun 2021 18:50:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95D776142E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfIG-0000BY-P3 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:50:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0v-0005dZ-0S for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:45 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:34546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0t-00027P-2q for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:44 -0400 Received: by mail-pg1-x530.google.com with SMTP id a7so3214536pga.1 for ; Wed, 30 Jun 2021 11:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=uK4HlgFg76DHiAcOgJDyWgRGibhhWJBv6ccDe2cnqFzOjvCiQIPpZm3xUk2xDml5z9 9xYIvituBRhutIUexLuCHB/7glmyCXKCDLeEl7Q/koHwawLxz/chIrupZJqZywIM7cpP ajVytP2E+T21aQhhFVyS/Tm52QnHbg+4GXgvlbS4YvauclAm82E739aVXfga2uoy1IcH V0WdKoO7JFRrHCBeXxcrec3X6xZXPnt2GplAd17raA5Gj/g/My7Hjs+OBmriMPMsRldo Np54yru95EBcz5yfRhbuo9QyPuICu8KwhAz1mXUzQ2LyjOU/87R6wPIuaZWDXnLWOAqM 6PUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9rewGNkgTjS5g4OXefHXoaM3PsmWPITsUkhsWrEnLmU=; b=dpI2his0u+vhdXfVOSqm1G+RvKjeowsbb9IqwXnMKNx8k7B9OLa3poBNTWTR21gFQr eLNSJmVPuruNkiIQRYMy7IK5Q0XlJgHXRILlHeF5FqAZpEfCELRFzyBrjda3arMu+Cgd jk7u38WS4FH9PCmICiZKKCAEnTF8K12zOdWZgIXzhwnTCxsCUEP+82/AjBzu653/drQm ryvcSaSQo4/FrqR1sOiY7TNssc5Busz1fvthxmDTf2neNodCTM4UK/hnBfUzfsYCcTDa YYPi92nVYQDvAiBqgNzumP1vcrGvlOAEDcx5l1LXNwq1F2QoxZ73L1WgOyUOn96THTgC i5Uw== X-Gm-Message-State: AOAM531zdcN9CVPZYZjP3UU1T9uMtFgQhizoyAa08wot6zUU073hCLlB toLqPcA95n/4QgJhpv3+1vcoEZ2MZj4lQQ== X-Google-Smtp-Source: ABdhPJwBdCGEWZDmJqnqzq7SC/qEwAQQUFzGZyioEEwWxfu96NSNL6WUPiTOccoz6pZnlxVF/Y5zhg== X-Received: by 2002:a65:5302:: with SMTP id m2mr35137862pgq.187.1625077961723; Wed, 30 Jun 2021 11:32:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 23/28] target/s390x: Remove use_exit_tb Date: Wed, 30 Jun 2021 11:32:21 -0700 Message-Id: <20210630183226.3290849-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Hildenbrand Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"). In use_goto_tb, the check for singlestep_enabled is in the generic translator_use_goto_tb. In s390x_tr_tb_stop, the check for singlestep_enabled is in the preceeding do_debug test. Which leaves only FLAG_MASK_PER: fold that test alone into the two callers of use_exit tb. Cc: David Hildenbrand Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/translate.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 117a890ecd..4742f59ca9 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -685,16 +685,9 @@ static void gen_op_calc_cc(DisasContext *s) set_cc_static(s); } -static bool use_exit_tb(DisasContext *s) -{ - return s->base.singlestep_enabled || - (tb_cflags(s->base.tb) & CF_LAST_IO) || - (s->base.tb->flags & FLAG_MASK_PER); -} - static bool use_goto_tb(DisasContext *s, uint64_t dest) { - if (unlikely(use_exit_tb(s))) { + if (unlikely(s->base.tb->flags & FLAG_MASK_PER)) { return false; } return translator_use_goto_tb(&s->base, dest); @@ -6634,7 +6627,7 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) /* Exit the TB, either by raising a debug exception or by return. */ if (dc->do_debug) { gen_exception(EXCP_DEBUG); - } else if (use_exit_tb(dc) || + } else if ((dc->base.tb->flags & FLAG_MASK_PER) || dc->base.is_jmp == DISAS_PC_STALE_NOCHAIN) { tcg_gen_exit_tb(NULL, 0); } else { From patchwork Wed Jun 30 18:32:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352721 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 174C6C11F65 for ; Wed, 30 Jun 2021 18:55:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0A9261431 for ; Wed, 30 Jun 2021 18:55:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0A9261431 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfNL-0000jY-PX for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:55:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0x-0005mw-Or for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:47 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:44730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0t-00027q-GT for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:47 -0400 Received: by mail-pj1-x1033.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so1983295pjo.3 for ; Wed, 30 Jun 2021 11:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=tVbqVrtY1mBu1QNknzhbpNXI/qBDKp1UL3Zcw/zGPE5xe33gdOuyam9WrOp/Z0hd6l dnl9jJgR1I8PS6BLPlCPhNZ530m5UbdYAEFveo4QMHfWu/N2ptMZTXQhiM2I8iJzgLWq 7N8x45neH6euzRT6BND1MXMKeZkBHGH8udu34R5Tvg7dRk6gkv5Wrcl9luMveiLFoSgM T+iqT8hEVpK6sEn8ue/lPz7kg9b04mw6SDSmABK0pikq8OTPJcpxu1W4Ghuc8I5bWwtR I8vWW+raaVaKnSm8/f8G18q6WnSWsDDnuVWMi0fazNjehSq5gkhApdlxjr7xYS32WzkV y0OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=iEJZ1BAQrcX8NzFo7LwsIgPoCSh613Sp31MnDBwfzKRr3uLNYefHpdv1MZMWf+HrxJ zKxTNm99OJtDBasBVZQBPN0Z8/Ix9/YcAeG1phuaG6LaPpaSO7P+lrRmi9DCxT7pTKR2 rzgKWNiY84B8BdWn7klVcWrvpJAz7WhY+cOYPfEq1n1z34Bp3SoOCRyliczUrNVISgBm 84lW/coIQRkvlmB58BanAPi99n41hrTrURNHTvesu2w7d49pSf4D9yYRmey+zeH/rgPV hlLlBGvjOzsgmDmm9/+IOf6t8Hul0CjMtEPEqYm33cfHL6k6YS+cKzPqOdrN9Is4y3r0 XpLg== X-Gm-Message-State: AOAM532S9qBhmV1PH8mFreFqLfqRT/bl6/s33Oha1BtMx+aPVQceb3NL /y7mPMyOMIUCwztJbkeMPmIuwTds/wG0KQ== X-Google-Smtp-Source: ABdhPJzbVzgxGrTyZegXKZFOPc2t4k+6CNRQsUW7tyjzDKo2oJV9c6vSi9TEPSKLtNd1zT+gDxVQ6g== X-Received: by 2002:a17:902:eb44:b029:128:fbff:1e28 with SMTP id i4-20020a170902eb44b0290128fbff1e28mr9495402pli.66.1625077962192; Wed, 30 Jun 2021 11:32:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 24/28] target/sh4: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:22 -0700 Message-Id: <20210630183226.3290849-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yoshinori Sato Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Cc: Yoshinori Sato Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/sh4/translate.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 4dcfff81f6..db09a0bce3 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -225,17 +225,12 @@ static inline bool use_exit_tb(DisasContext *ctx) return (ctx->tbflags & GUSA_EXCLUSIVE) != 0; } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) +static bool use_goto_tb(DisasContext *ctx, target_ulong dest) { - /* Use a direct jump if in same page and singlestep not enabled */ - if (unlikely(ctx->base.singlestep_enabled || use_exit_tb(ctx))) { + if (use_exit_tb(ctx)) { return false; } -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&ctx->base, dest); } static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) From patchwork Wed Jun 30 18:32:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4270CC11F65 for ; Wed, 30 Jun 2021 19:06:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E20026144D for ; Wed, 30 Jun 2021 19:06:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E20026144D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfXQ-0003iW-44 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:06:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0w-0005io-HS for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:38706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0u-00028q-27 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: by mail-pl1-x62e.google.com with SMTP id b1so1989115pls.5 for ; Wed, 30 Jun 2021 11:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c5zdFypNJUiuz9mUBU1bW+MPnocbJgkyrT9X/Rkk3hE=; b=XYko2A8DkdqNp2CiO+ckRPZLiXhFRfUQqPKHEgFO63Xlw06FTIJ3xKANnlwfsePULX V0iEViUIdfvBNa1uigszfYDVgaAgOqad+6uvSyv+XSODewWFKnWoPoBFCHB1APv1lsmX rjxpS5A+WAAv8LL7M537e1vEX7F57x2oUQVjCj4cyVddUPtwU5uuCyBcEO9aH90H1JwX iM+K69TIgrMuZO42Gs072r9JnudPEVvA1+h3AgEF3Qf2MRudjXXuPe66Dhi5g5DbvvEU B9+C9SYxxOiR+/Vnkz2NdQJvIGemf+Ltu1yNvubvBEAN+9PchMuRm+2m+WSjSKwdpkAJ kweg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c5zdFypNJUiuz9mUBU1bW+MPnocbJgkyrT9X/Rkk3hE=; b=HCuTpjX/D+Th10S00uqfl7hhahXWjsPfBAtOWgXlLzntOWvPWskwaypRdlrXkE1scf IeRAMWbzA/xxj2m3ghmDENNX3ws88S7DHRRgCb9bxD6OQfQVX18m97aRp/PQ2/l33dPD G77yQ9OUjK8dQQr9pXpq+2w7W6HQjDxvbqodv+NbHx5Bl0pfttSV7Pdl71ECuZOSY8JO Qry2DI4CnWDiljWLlaoG+LdQxnN9RFq8z9ZY+TN5bfAaYIVHy2lHYm/6uXJUOy9s4EyF dgkSIeditNpwraeTErOxdTGMlSbHzT6Shak52LOSTjosyoFz7zzR4Oqz9dtE4qFLBxEV +HtA== X-Gm-Message-State: AOAM533dIpH80iAfQNbPoO2J+Xx4ng21ZtE9y3lRCnRiokLKy6h2Yu+x BIZHSv/Mk8awG5oQGiQ/DdHTP26/W0eCtQ== X-Google-Smtp-Source: ABdhPJwP3Ajn7xCkq4svQtsVforHCgfwr0dGJVTFfKCHBMHOtTUZZuB0o5wV2VztAyMWTDYj6cqqnQ== X-Received: by 2002:a17:90a:348e:: with SMTP id p14mr40143906pjb.151.1625077962723; Wed, 30 Jun 2021 11:32:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 25/28] target/sparc: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:23 -0700 Message-Id: <20210630183226.3290849-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 4bfa3179f8..fb0c242606 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -339,23 +339,14 @@ static inline TCGv gen_dest_gpr(DisasContext *dc, int reg) } } -static inline bool use_goto_tb(DisasContext *s, target_ulong pc, - target_ulong npc) +static bool use_goto_tb(DisasContext *s, target_ulong pc, target_ulong npc) { - if (unlikely(s->base.singlestep_enabled || singlestep)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (pc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) && - (npc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK); -#else - return true; -#endif + return translator_use_goto_tb(&s->base, pc) && + translator_use_goto_tb(&s->base, npc); } -static inline void gen_goto_tb(DisasContext *s, int tb_num, - target_ulong pc, target_ulong npc) +static void gen_goto_tb(DisasContext *s, int tb_num, + target_ulong pc, target_ulong npc) { if (use_goto_tb(s, pc, npc)) { /* jump to same page: we can use a direct jump */ From patchwork Wed Jun 30 18:32:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBDFFC11F69 for ; Wed, 30 Jun 2021 18:49:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EC2D61426 for ; Wed, 30 Jun 2021 18:49:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EC2D61426 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfH7-000665-6F for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:49:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0w-0005iU-Eq for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:44761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0u-000295-Kh for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: by mail-pf1-x435.google.com with SMTP id g21so3294057pfc.11 for ; Wed, 30 Jun 2021 11:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HmrvZ2YDmFmQRowDiyGgkhSWbFuv8fekjQLGpsBU/NM=; b=ekLix1XCLSvz6b8h7f8cx7/My6vueHR/trnQ/pu1a/YM14JF5iRUiL2iJxpF2Jsjn3 9/lstKSfp9+WNxVau8TVNPQx+haTrDQy6JQVXZnKEZikaUxlEkobfqvVXc9jt4OtQ9Yy 5uInSLRq5ua/AvsNbWd70cuBGcTz/OSytxFYu+H2OmzBd7yDxw6cG7F2nU8YntnL+zOy 0THvF+Clw7O4b3an0nI62pXfNNkA5mQ/YJBPb8qQzoxwjE9/U++2969znzO25h04/YEo U36iTwCjSuZ9X7kqmhJCFvwX8Pt3qNLFMpS4CaSNLOJCrTillFyLT/uj/rMIPLZ4Vzjb 0JAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HmrvZ2YDmFmQRowDiyGgkhSWbFuv8fekjQLGpsBU/NM=; b=hrW+DGr5r41RlKfFOO/cjwYJ3J3kWaX6zitn+us4ROjXUQmyA16BLsMQbkks/mZvdp UuM1mM9jA9iseWU0M5ObuWM7Kn7QZ3aNGP7aL4Hc4k+rxAsOGfPPMzG6oC7H13FspXdY +jkphn7hMTUJx4xkFg/I37aK4espJuiOmxa1WL8FdRJh2EL3w4x5EvYSmTMsFk68UWfq uWQSzbGuSTgqfa+lhggWWXqiGmv1OOI50ar4YZxNutZqI1tMs0Zb97Mdo2SxsWoqBneY HWhfYPqRxRbt7IrqWUydfu5rOtSRRM1cwPSKfVFBUFXBd0+wGMOPFqzx+rN9GYmmi7m/ lmIw== X-Gm-Message-State: AOAM5317gwqhtUA6z0y84ZXnPeuW8ma02ZnPdpWJOSrawSAabON4OOXV zHc81fq7UVON9OffQeeua3lGNvc/IbirnA== X-Google-Smtp-Source: ABdhPJyd4CtZfyurpmEJqiDoSPcy+3iOzRnQKYJq8ee/mz9UwTkurpVLb0xeo2E+q3RrJyaoz37dXw== X-Received: by 2002:a63:3704:: with SMTP id e4mr34965806pga.310.1625077963390; Wed, 30 Jun 2021 11:32:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 26/28] target/tricore: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:24 -0700 Message-Id: <20210630183226.3290849-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/tricore/translate.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 2a814263de..09465ea013 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -3225,19 +3225,6 @@ static inline void gen_save_pc(target_ulong pc) tcg_gen_movi_tl(cpu_PC, pc); } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) -{ - if (unlikely(ctx->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void generate_qemu_excp(DisasContext *ctx, int excp) { TCGv_i32 tmp = tcg_const_i32(excp); @@ -3246,9 +3233,9 @@ static void generate_qemu_excp(DisasContext *ctx, int excp) tcg_temp_free(tmp); } -static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) +static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { - if (use_goto_tb(ctx, dest)) { + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); gen_save_pc(dest); tcg_gen_exit_tb(ctx->base.tb, n); From patchwork Wed Jun 30 18:32:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352717 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74A77C11F65 for ; Wed, 30 Jun 2021 18:53:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE6976142C for ; Wed, 30 Jun 2021 18:53:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE6976142C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfKW-0003R3-2l for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 14:53:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0w-0005jr-Ro for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:40458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0v-00029o-45 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:46 -0400 Received: by mail-pf1-x42b.google.com with SMTP id j199so2861281pfd.7 for ; Wed, 30 Jun 2021 11:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jlb9t26eUmvNmKvxgmiWrSkxF75bfUaFnwmdpAxQL3Q=; b=L4lRlSEe6X0ottRlvlfQnD/R36Do/SSlKLZPvAT19Ij2hgqTPSABLLSRzK3fd34j4m 6Xfm5omQ2qXVDCpMcQd1xGLW2HJ3araka2ChbnlRLguW7tPGcaBMo9mGZswyTMxftFQ2 IEQIXVdorrJxO25XxNdiXsTT4IHUMxKPlj3TbCPmsSj/BGdLH7l1FTTnXrMQ9vOqJFIj 7o8HaGDDqFRUAu/LdbiOKr4wDR9C2reOEexdw/Qr12rTJobym51X4ScjG8tCwcpr3VfQ J/YLQsRWqSUC49M53ptYOilTOEJ9iaxH0ssWVu3K2C7rPxF4a3936Abck9C8kgr4WAvv 7Fqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jlb9t26eUmvNmKvxgmiWrSkxF75bfUaFnwmdpAxQL3Q=; b=IAtsFaMiuOQHVkcKW0lQc4Nmih7QdkkSK7meVgnN9/qC7gZSWGmyhVsoCsusEvhZx0 IqfKL4Sb6HtkxqIKTtJNNDbtdONWBlhPrm0QvetKMhVvf54G8LVz5fURBFa7NDO+uZOk 7f2OHSD6C4fc94Dw6zoTnBFIW9pRfF5tjYU//PAJZKS8UGPsZmT2LMJxMur91FtA0EES 8nqMCXYic64VnNs9Hr92qQgh+kNB0IPfArrYi0EE8nmcIL1+i5BW8/WTRe+3qUeRtDY7 6RTXZyUYnr5qh8YOa1cAGaEC2qnetQaJXigamQmgY/Hx0ioC1SyngmsPG+fMJ8wQFhZO zZ/Q== X-Gm-Message-State: AOAM531N4av5iuUl1cPiAV0lSD/JGyYE+VV6m+tfor/boqTSE2Fuw5Wu mu7PEVhIP2vmGwTdoUPhH/yE+6L92YC+ZQ== X-Google-Smtp-Source: ABdhPJxxQECUuoCV8EuaGuK3ZgvcEnSU5InLMCxS7gWgsNx/RzNYwGPwKB0EI3g7zhovSgakParKjQ== X-Received: by 2002:a63:5153:: with SMTP id r19mr35566567pgl.56.1625077963974; Wed, 30 Jun 2021 11:32:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 27/28] target/tricore: Use tcg_gen_lookup_and_goto_ptr Date: Wed, 30 Jun 2021 11:32:25 -0700 Message-Id: <20210630183226.3290849-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The non-single-step case of gen_goto_tb may use tcg_gen_lookup_and_goto_ptr to indirectly chain. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/tricore/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 09465ea013..865020754d 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -3243,8 +3243,9 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) gen_save_pc(dest); if (ctx->base.singlestep_enabled) { generate_qemu_excp(ctx, EXCP_DEBUG); + } else { + tcg_gen_lookup_and_goto_ptr(); } - tcg_gen_exit_tb(NULL, 0); } } From patchwork Wed Jun 30 18:32:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12352739 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4003AC11F65 for ; Wed, 30 Jun 2021 19:08:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E15EF6145B for ; Wed, 30 Jun 2021 19:08:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E15EF6145B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfZm-000707-V8 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 15:08:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0y-0005qS-Gl for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:48 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:37726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0v-00029s-HA for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:48 -0400 Received: by mail-pg1-x534.google.com with SMTP id t9so3197431pgn.4 for ; Wed, 30 Jun 2021 11:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cqL8ixXnHLBIypnyWYXJ3pbFSn+qRlXr9cZUpIRddvA=; b=ObSzCpHyrnm35Af7BCQRjpEvH9s01TxtIfGkBkyZiT6dWfAaVYe/BzRKyNKZ5lLX0d +rfauUdWmbe95ZYzGSx7gBPCgQZ+dfKnMzLm1bAwKVYlrEO9kzMj0k3sN/4Bg3Qqb5xS Ow+qZwg0OsqZRBjvxWT+Sz7XZaFlDH9BiKJ0yW8RaB5N7EmY8sw907wajT8BAm2Gn52/ HJAOykLM3ScMCom9hn4luwucIwzpmf/TOzcMsCV53SpxnBdb/edZ0WHqJ4FVeAdGakdy La7KEMVWEyRD0bXOKIpraoYLZn6orU9u2FT2bEKyM1ydU6HtmJ905njA3NUwkXIIm2ET n4IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cqL8ixXnHLBIypnyWYXJ3pbFSn+qRlXr9cZUpIRddvA=; b=Ykgd1ppXCV7oOD7yJnwIesl00Ow/SP+cZL11aRhNY0eWav/RBm9D/a2U3hLTxOj7xh qW9OyqhjHUIQxx/s4PAZfUT6s/UbKVHTs97NrLMKTFBkDox2YwF44Ek35sPHezogCETi M/+o105sospLfSd593d8BCPj3fZ9YpDV2IhJ1ztm1zCMY8VpV93OpQqMMhI8rqz6m19v +5DmDnMamUv45QQezadsnSClcZjUMD2lZoMTK7SCFOg1yHSxvWbqM0g2BUJulQKc3lCT nAlzwHml6SxrrqkK2zoEyY143eAmXTUiYVREi9MwZcOSjih4lCGprabeD9MDCQhszVtw PJ4g== X-Gm-Message-State: AOAM533E2DeV8Cyh0zZ51PI7Utit0OOGfK4Ot3l/+QtdAlkhG1TQfbaY crOfMxtHH4wFieHmEwxIdLs7zoM+NejIpA== X-Google-Smtp-Source: ABdhPJz2fTjRCohEAeMJKqg8cKIwdSZjKAIiI2tyWYnMrqESJczTUhPTAgw4OQA5tVUdDuLvpabJeQ== X-Received: by 2002:a63:4c5e:: with SMTP id m30mr35360683pgl.153.1625077964435; Wed, 30 Jun 2021 11:32:44 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 28/28] target/xtensa: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:26 -0700 Message-Id: <20210630183226.3290849-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 14028d307d..ac42f5efdc 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -406,11 +406,7 @@ static void gen_jump(DisasContext *dc, TCGv dest) static int adjust_jump_slot(DisasContext *dc, uint32_t dest, int slot) { - if (((dc->base.pc_first ^ dest) & TARGET_PAGE_MASK) != 0) { - return -1; - } else { - return slot; - } + return translator_use_goto_tb(&dc->base, dest) ? slot : -1; } static void gen_jumpi(DisasContext *dc, uint32_t dest, int slot)