From patchwork Thu Jul 8 16:40:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365769 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=-19.0 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 5BB67C07E96 for ; Thu, 8 Jul 2021 17:07:15 +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 119CF61626 for ; Thu, 8 Jul 2021 17:07:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 119CF61626 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]:54424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XUY-0008Ga-6E for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:07:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X55-0001N1-Fi for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:40:55 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:35577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X53-00089Y-AD for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:40:55 -0400 Received: by mail-pj1-x102b.google.com with SMTP id h1-20020a17090a3d01b0290172d33bb8bcso6288060pjc.0 for ; Thu, 08 Jul 2021 09:40:52 -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=YgezZudac54HhmcCI/Mvc1saFYr7b6VC6nHXJTZyLjB/JzLBTE+Axp/Lm7q9Z3MoYI Ja3C0K/jKBDK4TMJ4nGBHv8t4Ev9o8JcVjbtySXRQxjSkWbkEjLyyXhrvx2GredzedI7 yeGPhypTxbDHxP1EbdNOuAVD4xsLdbGHyMrUls/jTUpSN8wjTJRHOl0jQYl/2n1ft7Dq 1gGnld76VvmVrfWkl3LQ2APRwVh+Pym+wxxTQb8Kv2yT5ZXUqtcXSQDpajHqq6wc/LNr w3h+RAkplCWPsenGNuZpKsUKj54Oety/t10dD1L8exjUNkrxBJ1FMqSGwXdz/ok0m+P1 y1oQ== 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=aD4NKxh88CTfr9rXF4BZstAYCakFS215meoHcZyeY+w8WpJ2YdVN7ppqrikqK/21mK ZMWoCH2r21UVQ8qUERuDBO6YCpt3lewzgRXgdV/mVoc3atVEMvdqXwQY5xwB2dA2f/jV 7HJaqPdF51ZuT3GZV+OLY+IUl/7Ltsr26NhJEPZJr7CVbe2keuIc40rjjeGOnaHZjRlc FLmdW5gNFLi6XI7cO+O88De7NNmqTJIO19hBhgZLmk/M56HlHnvmmTWQ2b46sun+fTeE r0dnY6cxeUjjP1IpenWllH66lo47L3I2y8hsMh7q7gPjammayFLTdTC6ipcIPLc5OjM5 KDuQ== X-Gm-Message-State: AOAM533M79XRqnag35EKBGFGhUuCL6EQLuBnsdQ07HcGbCYCtGXPeSi7 Ut6cTLt++p6PVLWwEfIeG7s5HHSjFV9KWg== X-Google-Smtp-Source: ABdhPJzoQRCVFE9aKF1Mx08by7LPRVN9M5A0pZgGMxkc/dUAQQ/HpMldXgQW2Pw6XxD0Vm/FXdMEPQ== X-Received: by 2002:a17:90a:bb83:: with SMTP id v3mr33120558pjr.102.1625762451520; Thu, 08 Jul 2021 09:40:51 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 01/28] accel/tcg: Introduce translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:23 -0700 Message-Id: <20210708164050.711967-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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 Thu Jul 8 16:40: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: 12365779 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=-19.0 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 4460EC07E96 for ; Thu, 8 Jul 2021 17:11:40 +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 BDB8A616EB for ; Thu, 8 Jul 2021 17:11:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDB8A616EB 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]:43188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XYo-0002uq-Lr for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:11:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5C-0001XM-Ff for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:02 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:39849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X53-00089w-Hk for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:02 -0400 Received: by mail-pg1-x529.google.com with SMTP id a2so6596333pgi.6 for ; Thu, 08 Jul 2021 09:40:53 -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=wSdjr/g6ebURffabwRVQ49phX7WVAZtuCPeYDJ3HffQ=; b=ng0PfcGHdqzM5NoXu6ao5ZApl6JorEieP90ngJ2UgWItpRAgZAqk11xUqvok1H/KBr jcnWbemeNj9ZLv/4Akt70PgfhUxFcQDKSfIQ/LRjXyq80USiYA/snkzoA4D/ajdvxBJn Azm+JTf6r/daNXiWn4UdQkvIjGTIFbXJY0+E1LyBqpVc0YbUAenNSMH0Cu4Fxop/wd8C PAN74WefLZ9+9EIrbZKYbWKhQDsoidki7q5m4OgHN6lbrtm6R6M5rIcLlTPeenjOvAFP sYOiF15h3F2Ndo1haw6/WcOs4eF7X4/SiDoV0Hd3L6mBqD+nDssOiVKELqLRtGG4KAnS 26PQ== 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=wSdjr/g6ebURffabwRVQ49phX7WVAZtuCPeYDJ3HffQ=; b=aEsFIIftf3hFPBRPC1sqwENNOWfkqwtXyTkgxFj/Z1/pb0Wbm1vqqpKy86xfmFg+0W YxEdqRBx/8wg1nOIdJsdnt3B3sflfDYd6BKE1dPkYRrJeZcm6UX5XYwZrvW+8LBnqfTx rrepa84Y9aWcsLslRV7LFOo2Xuv9I+3/1S86ZqjyUKUu0uf/jUp6sSnZy8GcbPLiQ2ke HIcVwhFU3smdBla4AomPIps/PIo2i79ilw7vQOhqjWwtVxUK7lGtra+Fl4uju44sJf5J GtJXjEs1dxAJW/e+aHCu4fDfyw+mEMGh//zwUhkI7L9VYanI+Q7BPnVHWKNhOkJ5pT+a /7Iw== X-Gm-Message-State: AOAM533qAiEIUBpAC7ZfmkmckIJA5wxf+u9rZ/r9YSvgd1QkibSoNXj/ I06x7arEucbLFBEh/e1eGtoWGTCIzwOsOA== X-Google-Smtp-Source: ABdhPJxp/8cy4S/6NxZbp/bV38OqsOutH1sjnkSZjxO41zlipgXkL3DYsVSyf1UzXGr6Lex/K/nJhg== X-Received: by 2002:a63:5156:: with SMTP id r22mr33647059pgl.264.1625762452094; Thu, 08 Jul 2021 09:40:52 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 02/28] target/alpha: Remove use_exit_tb Date: Thu, 8 Jul 2021 09:40:24 -0700 Message-Id: <20210708164050.711967-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40: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: 12365787 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=-19.0 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 53763C07E96 for ; Thu, 8 Jul 2021 17:14: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 DF85A611F1 for ; Thu, 8 Jul 2021 17:14:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF85A611F1 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]:57148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xc2-0003bn-0y for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:14:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5D-0001bh-KO for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:03 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:45785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X54-0008AL-0t for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:03 -0400 Received: by mail-pg1-x52b.google.com with SMTP id y17so6581204pgf.12 for ; Thu, 08 Jul 2021 09:40:53 -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=Mu/klPefx3rfkuaf7T8LxDUEzbZZpOz/hPlkdZ13L10=; b=valb4wA+xqJ1cZ6LgtuBw3tPYrmmeKEzPlNvgvcsdtWYlwvn2FXeqzq1aoaiWsNQYU lLN02J1KNgFYYVJ0BwUMC/hNCES098J+Rhs+qInq4rVc03o2XLJB7d4aEiEM1L05SJnd 5Yunv5JPhDeXqsfxmqADJ+nM51nTozI698BHQPa0WhTEq6mNpfVYhyM7s69HYBkKZ/5S 5CJsGWHjpnIoXvgA9AJcN9ccKqZFl8uLaD0aw/Z9DceHGaK44l6nGBmRA0MtiM4ylA6z q9mCMP+IH9NvLFAYgnsr/fAXclo1/krcBpGkWDUhzAra/ZwxxswS6IzM0M14zhZxmISK 6KkA== 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=Mu/klPefx3rfkuaf7T8LxDUEzbZZpOz/hPlkdZ13L10=; b=nhVOqRZrBM71NojjB5o4umbhrBa1CrQEm4wGfmNK2hh81lCIH/BeSe9rZQXqDCK7Gb xQgMKIw7GxJIujrfgO2zOS+EnbOwGC3OCxn3z7i1JS96FnWWEp7hM+EXae8tLbu1QRVv a9RXPYqSLJFnOJxw5bK/VE5CIW4QTGuunxl1bkdwrJwHfd1p1sQC83iKjlnPQn+Z2WZO nh197ufKOZqYwUnhWDakXpXdxPhJpWxUlgGCDvNdj56rVW7wTQ7oAF4nz3ctlla3Crat zFPvo1oMYi0Pe+QUies5igIFJmbRhD3POZ4tBvzKmEcx3nNQfe/ZGqcT3YlDYblWQGQt OGwQ== X-Gm-Message-State: AOAM530f572wQooN7TDI2E1QlXdHTbVaT/QWT5qhHV7p+X9ZzLFdv9nR Xc2LA7Ht289A3rzApIBMarCmObVEmODW3w== X-Google-Smtp-Source: ABdhPJwBYUbX/jxPoGdvfMjWEya7WypDUDl8uIxjyM84DUXp6NHV0ts2KmqL3ds75UkkY0BZtnwNBg== X-Received: by 2002:a63:214d:: with SMTP id s13mr33492499pgm.260.1625762452730; Thu, 08 Jul 2021 09:40:52 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 03/28] target/alpha: Remove in_superpage Date: Thu, 8 Jul 2021 09:40:25 -0700 Message-Id: <20210708164050.711967-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40: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: 12365731 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=-19.0 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 EB4A4C07E96 for ; Thu, 8 Jul 2021 16:53:16 +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 940D961461 for ; Thu, 8 Jul 2021 16:53:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 940D961461 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]:41298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XH1-0002q2-O0 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 12:53:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5A-0001Rh-G3 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:00 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:35579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X54-0008AS-Dv for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:00 -0400 Received: by mail-pj1-x102d.google.com with SMTP id h1-20020a17090a3d01b0290172d33bb8bcso6288143pjc.0 for ; Thu, 08 Jul 2021 09:40:54 -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=OjLj3bWSXSwoFF9tVv9gpEnSwuE/0j9Oo5pN/7U1dhk=; b=MfDYLBzydmucsUG4Op1HfAIPF/oX/t9r8AtFkGvg/i3C1l15FQ9kR4Wj9i4ndBFxkJ CqlvmVMl+qzOpTlKRTul0rnAjHtYXdkafDLBiIeXpuTrGviPNmcPnr4KR4aKYOU+YBE0 DyZzGzpK1oQ3/8RbwMU+sbkgoicpcwhna2KG7VzgS0sf/DwEUccaJZe7q7JNWkk2lONI pYfp55QarUkfU4mp1taPNc+hWA9mhCwDiiRs5O/GFWgnbSnmZgphgQo6HJOYF58otURx xXilZQRNn1LDIhY0ZpzqvPHiytvmvZsru/doHFxUNWmpJERXzGz32bP2bCPpKUQO2+Vw K9Dw== 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=OjLj3bWSXSwoFF9tVv9gpEnSwuE/0j9Oo5pN/7U1dhk=; b=FJZauJl7UpzLVfHbZjvyuMAYr8aJKc+QWsu2MCc+YAq1ajcXVh86ErCPRE2qC509k5 wA9DoauT7xsxpND1x1cx9VHqzd/u6646ZPu52ArPWqM+9mX2LQudLINjxJh5YBiHVW7u pSKxDmP2PkW1obfUQsPkY+SYpOzkbiUp/MaxG5NlsiXOt30mbUg2NAph10TT8/YEnKJj BeExfICmJYe5JyXCckqWtxSlXrXQB1kRzvwtDXSlmGwF6XBUNwrAx8c3FSTm36s3XoHt tSXVDVxiwpsC981D7haDnGMyC29HZitLt5zCSGKe6jeLgcLG9m8yQ9pFo5H4UvDavV5x G6PQ== X-Gm-Message-State: AOAM533C5vODY+Kghcu9amUq5+qaQEg6B/0JdOj/J/Xml+8VLvCx8U5F /UtGbJ0z23yfuEZAOD13tQxdy9pTVkORUg== X-Google-Smtp-Source: ABdhPJwPRcDQ+e2+VXLhqbEpNceKCzcVilHk0xVfSaes+6q7ZdujSME4n88bwkS0c8gX4LtlzTlcKw== X-Received: by 2002:a17:90b:3608:: with SMTP id ml8mr5816828pjb.215.1625762453198; Thu, 08 Jul 2021 09:40:53 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 04/28] target/alpha: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:26 -0700 Message-Id: <20210708164050.711967-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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=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: Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365737 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=-19.0 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 E6963C07E96 for ; Thu, 8 Jul 2021 16:57:46 +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 8CFA561466 for ; Thu, 8 Jul 2021 16:57:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CFA561466 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]:54326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XLN-0005em-Lm for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 12:57:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5C-0001WN-5a for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:02 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:35550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X54-0008AY-Vi for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:01 -0400 Received: by mail-pf1-x434.google.com with SMTP id d12so5974279pfj.2 for ; Thu, 08 Jul 2021 09:40:54 -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=UtQMxk5KkpHW1Lqe7n4zGp+8V8xKH7OiQm+b/05+KCc=; b=XkHDJ2fpzTG+VU3SP4IIyDo1dXpRf50kJiR6IwKn1RVO0ZB87RNuMxJyPIzI4PwrXs 6Y5fC5buYHNsaqzUKFDxaErmyTjSmuOfGl4zdY6cniToz8/8cXmeGMpAp22GM9cgrji2 i32RFdfHRljVMGOIN62m8QWq5rRAYi1z0nBlpcJ6rFQRSSGOHeM8il9WuOAPlhZfc4QG KHZc5cW452L7dQw5QhwG2Y3QW5femDlcoQ5XlVaCYCEdqdXDP3f6MjkCUSUmmtyGa8/d E1FnbRj4M1//QmLnhnkOKu9GEGcG/I1nxir91kDTxU2orhj8Xr9KMwdRrkNiZpDKcy4p QvUg== 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=UtQMxk5KkpHW1Lqe7n4zGp+8V8xKH7OiQm+b/05+KCc=; b=dqfuqMPYEAlhCwGzHMdzc0St/6Fk3V9DeOkQyt02Ps7KmDsfTyuqYLhsGJTxp+N5fK P3C/khSL4w3RJH5wxt31Pbk6/GGM/qzKRSkdlyA1pXVONI6YFpTMuR/ZTItvgtK2Bpba 3wVmWSrLMxUt387vYvW/i1mtSszZHiR8weY3+B0sPqRUT+Pq2AMIggkhyaIhmnIc6zzt q6xJpy/5g3wkCfmrrmIzZQuuNb0oug+b3nuuRE1E0nTBLpPVN8mmDoxpSB9vp92yRR4t dWx70gfWSpM3HfJx7A6YMwQmr/VTbblg0Ul7n2bpxYBXc5HVqUQi6Q/DIChiRsLhwFIa YQOg== X-Gm-Message-State: AOAM531/5jtNqyy3VGQBeV8pUaiSu6wsgOeLgKk9ocb1qRsvz0Qowsox 74dGJPjLh0vSHFRY+XC45ETbpMAOe8FHHw== X-Google-Smtp-Source: ABdhPJzm74F11i17HavxjQcsT1PRABxnYmhQJNErrK5lLyZZyHC3vEI/1trfJmciL7YWb618xf5/Lw== X-Received: by 2002:a63:ee11:: with SMTP id e17mr32902327pgi.323.1625762453641; Thu, 08 Jul 2021 09:40:53 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 05/28] target/arm: Use DISAS_TOO_MANY for ISB and SB Date: Thu, 8 Jul 2021 09:40:27 -0700 Message-Id: <20210708164050.711967-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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: Peter Maydell 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. Let the branch or debug exception be emitted by arm_tr_tb_stop. Cc: Peter Maydell Signed-off-by: Richard Henderson --- 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 28e478927d..293917be4f 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8905,7 +8905,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); + s->base.is_jmp = DISAS_TOO_MANY; return true; } @@ -8919,7 +8919,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); + s->base.is_jmp = DISAS_TOO_MANY; return true; } From patchwork Thu Jul 8 16:40:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365775 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=-19.0 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 A0BBDC07E96 for ; Thu, 8 Jul 2021 17:09:24 +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 682B2616EB for ; Thu, 8 Jul 2021 17:09:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 682B2616EB 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]:34704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XWd-0005Zd-Et for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:09:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5B-0001UZ-Jv for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:01 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:35552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X55-0008Ag-Jk for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:01 -0400 Received: by mail-pf1-x436.google.com with SMTP id d12so5974293pfj.2 for ; Thu, 08 Jul 2021 09:40:55 -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=LLqLvbO0HhVOjC+FZ4WKlh7ZoSv8S+xpjgL8WHiyFE8=; b=dnU8/S2BENxBajwg5xuzE/tzBZunMG0xtu8k7zjE3ZuxAzQBy3TC23VefZ2NxEOPBg zR1i+8KVKn2ucwe7py/h6NN5KEOa+c33MKd9blDYacZPtsqQw2YzWO0q2Pa9qqRZba/B CVIGt2UlyDYMtMiEi3ZC907X38sh44fUK8zE30MLJqagZMmTeXiw/0H/g4ldQlNJqpZp OjyM4KyCTF8xnM6Sv47oe626QTCKzNYm2yjPDpG10xo1P/BuMHu5nmXjhO8o2gjfeoKs OnuiW7XkvT/D/TmOktE4fW85q137rMu+qBmg0huJt+m7TrJpFzCdQAYD2NzkCvTvr6kF ZpEg== 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=LLqLvbO0HhVOjC+FZ4WKlh7ZoSv8S+xpjgL8WHiyFE8=; b=Zz1CCTiqZiuqdmUKvC8GQRVooiLBgRd6W1KPl2s8PqTQJZdHDMgsE4sWFnEYjpfVy1 5YitXXhMvnndkW9FpQ8MeeHyNUr0+ErjX4gOICb5L17PsTUvDgMYuictV7oNNURhpknx kMa20cs3MGviEcscHONsCK+hDzd5zac2i2bc8kP/k6WjzHwmQVaihFC93nSnLN+2893h 3nXKYrEhjyEafw0VWWIwjSuDrPYu6X/S4e3me2GET49sqVKfbCb7NhJeYOCn2Wto20q5 9VZBgZbbHHWo1pNfRFctXrDm/cuBIdg8BH5Qbp7uOQftbtYZ0wvEh9LnQQrrWb3+MibG xFNQ== X-Gm-Message-State: AOAM530h29Mg3ViltiB0WXJcj4/uMyvuNKelHvkh4T3gRt9Z8vYQuZE9 CMbt5ezrge1fBNcFHopZUhwfHEf8AwTeAQ== X-Google-Smtp-Source: ABdhPJz9UDu/4NgiPuALjCtLetKF36jG3gqg/sUiJfrdQYwhMj00ikCBtFFEWQOiSIe/DnJ96DP2vg== X-Received: by 2002:a63:50e:: with SMTP id 14mr32331752pgf.429.1625762454155; Thu, 08 Jul 2021 09:40:54 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 06/28] target/arm: Use translator_use_goto_tb for aarch64 Date: Thu, 8 Jul 2021 09:40:28 -0700 Message-Id: <20210708164050.711967-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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: Peter Maydell 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 e81cc20d04..856a689b90 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 Thu Jul 8 16:40:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365781 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=-19.0 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 DD43DC07E96 for ; Thu, 8 Jul 2021 17:12:40 +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 8C3D6616ED for ; Thu, 8 Jul 2021 17:12:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C3D6616ED 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]:48540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XZn-0006Oh-Eg for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:12:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5D-0001Z2-5A for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:03 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:36455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X59-0008Am-TA for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:02 -0400 Received: by mail-pg1-x530.google.com with SMTP id f5so6601768pgv.3 for ; Thu, 08 Jul 2021 09:40:55 -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=lllHgSMReAFAQW4NFUeLJDN7hewzeEeGDsmTtDYLnv8=; b=s9nuLELFDWCl3eBIm0//0L9Zff3cKMaJgEwIJbMXZg8TzasFiq312GmcUh5nIAfQQG XNlie09OH4t2/hoStUkc6nauJIQCtAw/PZCK6Pg2461MHEvE1YbRujvcuMEapY0w5g9G 5omZq3U/ZDOhZ5cGm5/Zy/rWdTNn6SmMSgWZKqzhiE3mhJyagV6EC49KOsuIswfgTMFU NX+WOgsNNeuJ5oYg8zUsp1R1oHdSo7xStNrGTJOtZJM+C20NbpIquhBfmasyu5ioITeE jfaOWrJ5Q20/Qw+tf5vEKxYNFbnl4l1TlNba83VNIZHAlyODZnGfqj1lLff40i2Nmec+ +InQ== 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=lllHgSMReAFAQW4NFUeLJDN7hewzeEeGDsmTtDYLnv8=; b=K4CxKfUPGGKwHb4VqNryhvLXTV59xQccnpK3mzvtUw1e03PQrjutzsh6saJ8iWbiip C12J4yhNzNO13TnBVfdf/oUpQA8zX3UzYpJkNu5LclORHF9Rv2dhjXISy2l2hXVMzR29 yt0ymQUpr4iJv0YMbmsSmVyB51yBVi+MdRoEihuL0xVK3sQSRBWUcbrYjtaLOTfDX86q WwG/kgp3sRNYvhyDZZ2LH+Pe/rTF6ec4Jl/P0jQHyu7KMAcb7MgAm8/20qYDsG4KlKFD 0ODeMGGq3R73pJi+Xa/VIa6jj3q9lkI+27I7OeiKCr0GAgN4kt/hRs4E1HMv8WpHEVrg QfRA== X-Gm-Message-State: AOAM532IuOxrK0LvMOKilKlPsFuB7UkVnhxY8/S4mFs/Mg5BK6YuZn0I rdOwL4O6Vfd6YJtb7xPGJvtvrxvA7df6ag== X-Google-Smtp-Source: ABdhPJyWoWsE4jRvH0aq4OPxbehd9i0la3z7KJaIO3U4vhKNQmaRxqS1Oz3w1MKTPDp5NR7jvC9GrA== X-Received: by 2002:a63:e50a:: with SMTP id r10mr32887801pgh.30.1625762454784; Thu, 08 Jul 2021 09:40:54 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 07/28] target/arm: Use translator_use_goto_tb for aarch32 Date: Thu, 8 Jul 2021 09:40:29 -0700 Message-Id: <20210708164050.711967-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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: Peter Maydell Signed-off-by: Richard Henderson --- 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 293917be4f..535b691f3e 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -2579,16 +2579,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(); @@ -2600,7 +2590,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 Thu Jul 8 16:40:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365745 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=-19.0 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 53FDEC07E96 for ; Thu, 8 Jul 2021 16:59:56 +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 DD89661606 for ; Thu, 8 Jul 2021 16:59:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD89661606 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]:34702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XNS-00039S-Rm for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 12:59:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5E-0001e7-2w for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:04 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:44002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X59-0008BP-V2 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:03 -0400 Received: by mail-pg1-x530.google.com with SMTP id y4so4108770pgl.10 for ; Thu, 08 Jul 2021 09:40:56 -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=k3KB/Tkz24jiJG0J6xu6GsoVxf3biKKstX86Aezy0Ms=; b=dwTGiom+JG/AgfPo6PBVvS/BCXvoL1e3cqVikT+WsjsvvxJamoujvFkO38o4U7lrOG cL2fSYg8P75w3CVGx3dw7TprMbah8/g6Vdw9L4UPOWtFveuPirqTb/sAJxS/qyYDIOsE senLoC3T/4ihDke8oWxP7MSxZMhsDhymZORl3MdqJ/1Y5LCxSwxHljWThh3rhDezo1z2 9VC0XWB/ZhNbF5nKulOYYDWWn8yst3YYl3dqIXLx0bkCog6oOYVdZKsuiylzpqWcM68f cgiS31KfDDe1sqWcV8NInoVNo97JMMdYT0Jee2axmY+c29BC3sk0e248xQEQkf4sjvtL e16A== 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=k3KB/Tkz24jiJG0J6xu6GsoVxf3biKKstX86Aezy0Ms=; b=Yz+iEuLjVqH0VWnLf9x9nrMn8dW+8G+ep6r6QIf4uGz9FyyIlaEDKWZbsHxNuGTMOd l0G20BE3pEx2HPh8KXIIo/NMrmBgg1MAC7oySaqIxnaC9o50IdrtuXzQlg4wkhPhv4Io oohIybgNJyU6hkiCYkC8vIwYX1FaVTaQFw467KkGt12S8qqHsvgTlVEzbCihhwwCR2i7 Ph+qYoxAE8tksj0uJQjYBK9ku10KbypTH7OqyOB5Ts8viIKCCgb7F7qpealFCXjCi1fO /UqcQ1inga/gr4vUj1eYSNsQeT9XA9wiFq+HKUjM1RubrpIbXRVPR7hvN6Sw1SJgdzHb /5TQ== X-Gm-Message-State: AOAM532Ru0E8p4/NE6rOtsxIpn7vrZdbRto48fGr/bUpaI0XmcLaIXm7 N0l+lvlToDibdW44YVFVIwbDZfk/Z8oDoQ== X-Google-Smtp-Source: ABdhPJzytR9KCUmtAk49+iDAMWByTvdiCwciYPAzXtUN36V/kGS6rM9MmVJfXD+vcPII+GUdABmjAw== X-Received: by 2002:a63:f955:: with SMTP id q21mr33357852pgk.448.1625762455389; Thu, 08 Jul 2021 09:40:55 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 08/28] target/avr: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:30 -0700 Message-Id: <20210708164050.711967-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365743 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=-19.0 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 3F8CDC07E96 for ; Thu, 8 Jul 2021 16:58: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 CCF1B61466 for ; Thu, 8 Jul 2021 16:58:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCF1B61466 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]:56584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XLw-0007B7-12 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 12:58:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5F-0001jZ-Eb for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:41725) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X59-0008Bq-Ve for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: by mail-pj1-x1030.google.com with SMTP id oj10-20020a17090b4d8ab0290172f77377ebso4192803pjb.0 for ; Thu, 08 Jul 2021 09:40:56 -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=S3bF7FIBZQHgma3p/JJR7Chp8QnFhYXAAkZNJ3AWB36kOkETWPE08AYruXCHE8QICh zsRlZ22uCJNTy1ZjXc+AvdB5Zg4wTaVE0cFdi7tg67huk/7VZBDlz6vQQO8CVrQFKmca +AiI6GbA1JKZNQoS1EhgOy7syfVedZIuQXKxDF78yeqn5VlvvnRSl/tVn8j0pI4+1EZw WqJS5vWfDf2CxzwjiiOfpvFr5yBYzP2UHMjLEM/mhv5Fk1QmDES0w5f99SdRgADAYvQH EA0eSo6QmbcqvgKR+mWCNycoJrqAcJhT/CdNzKiJMtENhCCaeSJv3qd5XgnBsMy6bZjt m1Uw== 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=gja+IXmrGAocWkdVlAV2ZFYK1q0m8JgotkWmYbAW+XXLh7YwPfZ5tzyXhbWewkRmVN XDq9Xt+kTxTzRktIoULSeyIf3AVK/djf9j+yXUPLEhZ0G8tknr74CQTMzzcG/tKSqvWR ykk4TQDNFx4SPTsbQvTG9AePjverSGumkeQRDt/k/FoTEVYDqMz/StTSBMYsC+whpuPm GX7FzqhJdH8f/GDOPSXjFhEH09qQzuaffWjMpIYKGvABzNu5lD/s2yfEvtiR0wf2DJVY EISiFOenDuTkOWK1hrukwFykD29r6gEz2WTJxx0xpKrCYbX+bpgyQ08DI4Vg6vrhHJDV QYEw== X-Gm-Message-State: AOAM530lcIeCAAvzB8WY9XMn/z/0inYkkna5JWgB+aDXoAVfytGjim93 ItOsQAqFgBzPizg43x4VIfZLLkbfglO3FA== X-Google-Smtp-Source: ABdhPJxqRQ/+RZCNtRLXMlURHzpLtJqC0QK6lR1XNb6DBu2ib4aUd8ka+8G94OljV5ZekNDEichFvg== X-Received: by 2002:a17:902:c40c:b029:12a:cb38:5f0a with SMTP id k12-20020a170902c40cb029012acb385f0amr1731259plk.73.1625762456066; Thu, 08 Jul 2021 09:40:56 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 09/28] target/avr: Mark some helpers noreturn Date: Thu, 8 Jul 2021 09:40:31 -0700 Message-Id: <20210708164050.711967-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 Thu Jul 8 16:40:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365765 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=-19.0 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 1FF93C07E96 for ; Thu, 8 Jul 2021 17:06: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 D5DE36144F for ; Thu, 8 Jul 2021 17:06:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5DE36144F 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]:51544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XTr-0006JG-St for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:06:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5F-0001i8-09 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:42530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5A-0008Bt-0d for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:04 -0400 Received: by mail-pg1-x52a.google.com with SMTP id d12so6590880pgd.9 for ; Thu, 08 Jul 2021 09:40:57 -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=6Rapr7iimpdhsvlJbkrn7bhLmNAPf2Cij+dMdnxuJ2w=; b=hJEZXPhq0stpILgYwy1tcqPPPFWEsoYRhyJ5el/fL19v6ezB1OM0B5wK875Xdhg91p p0zUdN1YCeQoKpJo4VGZ8weIQENycuzij10jB6WgH6Ectbfc3wrWJkuX6m/VHx09Vb0N stsDk1fk1QPlWk58eRkQ6+ZlQfWB6/9lRM+veE+7QVHlVU4s49Z5HX9fArs2tz2vKdQS EpMB2TctGpwj9uUbyZzgVJ7sdKQDps0kj8vo86d4/90GFlahVFgBEA9vdWyw+9E11xU1 Z1KB/BN/S6P+kKeDE/rqDv5ZtFhwUSMrW056IvjbKe6z11ijuCzIx9NftiIQPXut2oDO hG2g== 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=6Rapr7iimpdhsvlJbkrn7bhLmNAPf2Cij+dMdnxuJ2w=; b=CTHi+vqHPvI/BAp3yQTEd4S0ozuJvJH1NM1XvvJvYmbxWdOCSTson/uth9g316g9ay 25QJyuxHHSqcc4CDBXWgEDqkBnwDvoYzpXWdezyjKRY/Q+QO+PDyOdUMUT61qNRFrNZk SY3ZbUYCfmQoGvuGEVIvRZcNsCQFZ7Ltu6KBAwGaA+Yy20YMzkXZPKx/zluAZ8HclU0G 1PJi7P0Ezz5yUB4eqiGpG6FqRS/+R106E2NBjoJhZzAxRTMXip85+zcespa3CSeErN9e /cH8GXt1I5lEkRwp9Il90KqTFLaLNECH/rCN3A9smlrUAPbqPgjU4MoewuRG2QRH7lW4 CMJw== X-Gm-Message-State: AOAM532i3c+A3IZl8HKZrEX/7mScuefD6N5x/8dd2oHiYBD5UC70baXB LCJ2oBhe5+HNOWGgxPLm31YXYvFIyaeKOA== X-Google-Smtp-Source: ABdhPJyjNkrvrLRcNlO6gTWTsC9uTfW1hqp4ASZdvmh6W0GHgDmOaA+mQ4E9pQ/vmZ9keoXVhrLy1A== X-Received: by 2002:a65:6449:: with SMTP id s9mr493228pgv.285.1625762456558; Thu, 08 Jul 2021 09:40:56 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 10/28] target/cris: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:32 -0700 Message-Id: <20210708164050.711967-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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: Peter Maydell 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365801 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=-19.0 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 5EA6DC07E96 for ; Thu, 8 Jul 2021 17:20:25 +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 0DB5D616ED for ; Thu, 8 Jul 2021 17:20:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DB5D616ED 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]:44644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XhI-0005el-76 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:20:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5F-0001kF-Nb for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:43804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5A-0008Bz-0V for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: by mail-pf1-x431.google.com with SMTP id a127so5942820pfa.10 for ; Thu, 08 Jul 2021 09:40:58 -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=64UVSl51I4z0fyHgb4qnEQ+WKR28E3IW7CiGNqO5dw0=; b=refHm6/Lncq1hb+OoeTj4BwZzP5tPqqBuGQGXdZGmRIcVY516yNej55VEkVvGR9mUu GO1Nm65zPxtTD4aERgOdj2ECBt+ZDr/KmxIUzxnXgS62KFf1Id4er3kAgI0t3dqu75Kk JOfg/z7RvD6rmZP6P8H33Zk+5e9F5e0Es2RaptMWYe31JyjRvwlvxF5f3T9P4sxbPKmu qkPRhfIpNy+hFptjnIZV+urhSw9BXdE5K3Sb2VKSzwKCTLngk4rnT0g30oeqbA5FcgtD cwBHcWqS1o7RA1VlxqgewybV711lum4MSz59AzJiCxujtBxS7okAxlvmO7EB0/vai9We o0Rw== 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=64UVSl51I4z0fyHgb4qnEQ+WKR28E3IW7CiGNqO5dw0=; b=lmUnsGUasRzCLckOwH5TXfv3RBMkIvdXl6nOjNq9IU0rkID3j+nGByNAI/fDQMIWLD BHsAr9T1dKwM4uY7srwSRs31GiPV1L5chYDlaooaoTUO7RiMrW0WQKIVQQSpanIOfXLa D5wTMpomh3DwKn1UueM2XXwy9qsgSxV6rcMo2gyDti8+zWYWh7YgvP+BCLq3yngTuM9h CIp8Rboj0Vli3ElMcrAj1Jd/DHqJTBwaQ+bHQxTxzbAZvXJcq2LnpnltUYjakGHbZyze VtaZO6Ub3damxox/5iyaBllv2/9all10zaJgNVDNxjgVzaRt4uB0YgfwghzYIJszaWYQ JJOA== X-Gm-Message-State: AOAM533lV/0H8sZdJyg3+WRlgl/R+jS5LShCY3V0EARCAo6nbzKcgE6v JLCY5L3qbKLlrqzmNPA0vRhd38M5J6l+0w== X-Google-Smtp-Source: ABdhPJzrJQRIwfglNvy984blDkUq+TReoXj4OvVjpEwlNh1DsSEhIkoOdfKFhcYDGTSQK1kw2GyXvQ== X-Received: by 2002:a63:5d52:: with SMTP id o18mr33090675pgm.440.1625762457240; Thu, 08 Jul 2021 09:40:57 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 11/28] target/hppa: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:33 -0700 Message-Id: <20210708164050.711967-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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: Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365761 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=-19.0 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 9724EC07E96 for ; Thu, 8 Jul 2021 17:03:26 +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 322F861606 for ; Thu, 8 Jul 2021 17:03:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 322F861606 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]:43132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XQq-0000XD-W4 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:03:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5E-0001fD-Aa for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:04 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:38709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X59-0008C3-Uz for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:04 -0400 Received: by mail-pg1-x52b.google.com with SMTP id h4so6603597pgp.5 for ; Thu, 08 Jul 2021 09:40:58 -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=5qeUnpTdLcqBB4VJnNOm/71P6psxWkg2opVhSeP3uiA=; b=BLuspFy5pWnF7Im3xuUhe3vCxHWPVEGXg1VErOkAiX9eii97eaClRTtDyMu/6ws87N t0i44OrVwzT1YSQnk8mWRlI4+jZZjPQpC+d+Q56ERgAUphraxPPaaqBiUtZTXVays1/m lxML2J3OpwH4mU6383qMBQF59bDESHqnWezNzJ4u342Zop2DyCCV9gWsSKt0NLGekOcZ fLSVvd7cneuZydlJMbaV1AxUBAxhBatHDppD9r3jalnREP67l9tEpiVjQ1L0oE2XsTrf XayCvN6Kc76xSgOBcQkWnp7Qnz3qu93czXFciPnIFkpBP22smYo92/xACgQWLB17D4x/ iPGw== 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=5qeUnpTdLcqBB4VJnNOm/71P6psxWkg2opVhSeP3uiA=; b=f2VDucy6m5CsfMBRASjMoffWfON3EmLpAhAkon5IUi4jwXpXdYTvqmFJQKRcmxFcqc 8rZLmdNAa/2v0eilGQVObN8IdgYFhKfXZtIR2qynG1m9yktSoQA1lRA07DQ9KcfOSXbR zc+o7gmhDkX2qLq8pISyH5xM80fBC0qQ6UsFvVTOeQpavu/3gXd71I7aQIWPJ/f7zmAt XYpqmhBAycLqZrWwaodwVbi/GygqqUhMzUz0XxKzOegKgFlANcG5adPbOjtpcaj59CF0 5fUxIIfvxp8ktfoM8scVvs/PjI5zd+ZTEJeNuRq+iSo2fxFd8SxNBb6aMKbWBpt/Auqv IyoA== X-Gm-Message-State: AOAM53263w13CBeLmIq3Bme/1bDJkuScsoCvmMMlhbo5OBHlgIhVbJAc 7yWY2UYvYJ89yfmPgN0YJxj7Etha+PX4yA== X-Google-Smtp-Source: ABdhPJz6yntRX1rLqfoT0/MOWl0w2v8NKWzuPx4FFMeDhssDFiF4AehHLkzp6RihTb71nPk/hgXTog== X-Received: by 2002:a65:4286:: with SMTP id j6mr20227986pgp.10.1625762457838; Thu, 08 Jul 2021 09:40:57 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 12/28] target/i386: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:34 -0700 Message-Id: <20210708164050.711967-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365735 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.8 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 708B5C07E96 for ; Thu, 8 Jul 2021 16:55: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 1911561466 for ; Thu, 8 Jul 2021 16:55:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1911561466 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]:48570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XJF-0000My-8W for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 12:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5D-0001ZJ-7B for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:03 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:40882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X59-0008C9-Ut for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:02 -0400 Received: by mail-pg1-x529.google.com with SMTP id g22so6598701pgl.7 for ; Thu, 08 Jul 2021 09:40:59 -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=nBdqjSVeVXgtT2KNOpd+QF/PXWJox+iIJ0CG3FMfQD4=; b=NIoBVMMjsl6FFLjYMlxelflCu0X6sSw0MPqhXr1SY2wmWNwmyBWSSH3zpf8qyufnxd 5Mj5hB2ObC93Ng1Oq8sybzZ/JrjO1Ht3SxZVobr34WSUaYUs3CNVOE14TUHxRn8gsHnR LWWKh6PlyDEnTDorgwaIO5RZa77fd8erTSWEmj9gH4ugNSHe6GrVFOvJMe8YiEqaqk+P s9WHJkbTmi5cazICK2gOgmM456wnNGzBeViaQajm0GPEWHEsoGCi2xANnPCgg8mprvEB x59VH08jleh+I2QHW/opcv08CCvv3BAhf4M64M38owwmTII7KdrXotykl6fqhRhCoM5f ZLbQ== 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=nBdqjSVeVXgtT2KNOpd+QF/PXWJox+iIJ0CG3FMfQD4=; b=OGpmKox1Wekf7wV39YhmM436D/VaVHr+HwTv4AUjPpRttApLHOm/LUoytJEaEAi05C tUUx1Wh/UrBk3yVtuz2t8nX0z9SMTYm4Se0dZG83uiJuz4VPqtyGRskZL3aVCDaFAWYr nTGAKSIIlcHgi1ucdqUsgamyu3BRQt3NS8JeUCIrKmWVtri4czRe6clhAQxxVi6btpWy tRVMBe7T3COfDmZH0A39zKfVFy8ltRNjmJiEQT1c6ZUO4rl4RuLI2Kp/rQRWKyYiXuLu Tr1FNKNS+wU5GRHqkuzIKgMn6GpfJK2jGeiEwz8YXr/iQbP+A4u2flV4TtSf2RSruCJ+ SPrQ== X-Gm-Message-State: AOAM530xY7ox+5U9huLJhvXpOJWhmR6rGZCNN7xdu8ddL4aCgF7xplZd uIsh5gMA6mx3NNAaba0Ih1AjyuQyhgWFuA== X-Google-Smtp-Source: ABdhPJw1+8hME2SByWU/g96/HAksD4AxOeT6dUPadSKL+PQoY6k6xYdrL5pgm6Vmj9S0IAfU2gk0hQ== X-Received: by 2002:a63:1c0e:: with SMTP id c14mr32546924pgc.11.1625762458460; Thu, 08 Jul 2021 09:40:58 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 13/28] target/m68k: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:35 -0700 Message-Id: <20210708164050.711967-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell , 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 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365809 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=-19.0 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 0CCDBC07E96 for ; Thu, 8 Jul 2021 17:26:15 +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 A23FB61874 for ; Thu, 8 Jul 2021 17:26:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A23FB61874 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]:59674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xmv-0007Y8-Mv for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:26:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5G-0001mf-IT for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:06 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:34641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5A-0008CB-40 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:06 -0400 Received: by mail-pf1-x435.google.com with SMTP id o201so891561pfd.1 for ; Thu, 08 Jul 2021 09:40:59 -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=s832VNdRirCs83GalQQ12ruK8zX761l5jTqXjzPJJqg=; b=ZTDWayYFFG9iXuEUibLMuRYI4alhmDzcwbmcWv7+U7hmsL2yYbm41jLVC/HNG7LIta h14lOz1quQUjgJpzyNtlpL3pqmJEdqH0rYqVlw6kLASDoJvO+y24j+92/bk4TP/5xoMT WWXpMDSImSRR3lOli4uAkNcta9xqf+KlqbWAl/rBjubB6nIvhVbFrWcinGjXhC3Qv2GL qF55Sp7jcnpJEdvqzQ9NBEPG+ApQqUp0D7frYbVovABjR2/YkF0117G39BK/mGgQQgQ4 /h2N5Clfj397DD/xFWe/uZgHEGgVPuXuShbGX78dUOgFVchOERODV41P78xsd3aMiYp3 C5MQ== 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=s832VNdRirCs83GalQQ12ruK8zX761l5jTqXjzPJJqg=; b=mLuP1GqJDvTzwSvEfdazjeEhDLq3vM51PE5n3x2r/kF/rjnG4dyBC7e47jjOr5xsWY 1tv2DpNFZzU0KKi2FruX7tT8yiPeEXLO1tBwvny7E36jmsWysO0Q4rAmi2bkG8cEFCOy FsSmwz3GWrz5v6k4yVStzk8UF1hS6w3SiXDGfCtx1Yet0FNCh6/nB3PecUdi67WifV53 Ii3YrpCccx0JrW7MuBkv+HcS89dq8y+zQZRWEPv95NtHKNnFP1cA8dexlEwNIyCgLDP4 vjOfen1330/IfuOtTyFXz+HFYBK3jDfObGTcUCBB5C2Ws2ohnPA419wDPqE84ROLUlND 7RbA== X-Gm-Message-State: AOAM530AlEnKVdjhHi6XysdHO3s/lNEXeujFzA6ommbb7dT1UDKscpJz kcMcFQSxlS5muGLR7iXTZkXKsuBr4uG+JQ== X-Google-Smtp-Source: ABdhPJwAg30sDz93Ykb6ayo9TtNF3FWWEvqK8Wmasvn3ov93f8/9jy8RjAbVqB49eXrDcr+OcpAaNQ== X-Received: by 2002:a65:4103:: with SMTP id w3mr33113451pgp.308.1625762458889; Thu, 08 Jul 2021 09:40:58 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 14/28] target/microblaze: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:36 -0700 Message-Id: <20210708164050.711967-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365795 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=-19.0 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 179D7C07E96 for ; Thu, 8 Jul 2021 17:17: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 BFF59611F1 for ; Thu, 8 Jul 2021 17:17:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFF59611F1 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]:37114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xev-0000gO-PA for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5F-0001js-KC for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:43889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5A-0008CH-HY for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: by mail-pj1-x1035.google.com with SMTP id x21-20020a17090aa395b029016e25313bfcso4172969pjp.2 for ; Thu, 08 Jul 2021 09:41:00 -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=zvxeXohXPpAsGvwu7ALFBTn8vSp6cjjBBPdOsMUtX8A=; b=opOX/3kEqlcEcnoFUHUM+zkPlSgsBHo1UySmIqWXgTCEv3hxfw+Nv4MijVwqCSlEfX FJb6YoAkz7dTV55p35jEWfH2BIZJSvI/sCcUUjOcfkWzHAkl7GvYgQJ125LmL9t9gK1w pyCkXLomiDXEc38TEDB3Daw811DNsgHll1q3JzfURqB71i+pR2f4GZgc5/x+ZAtODOyZ lY+5z1V5wYaSTJI2A25nCMgGQiYjhrMUgk9+KVBQO2CZ7iaDv47A0O8OKom2aj//B07V oVySRvlVW8iZrSHPyRf3JBPA/ydI19NZj7f2+OSGvOe3lC+3/3d/bOi2Su72VFhZRhNK QKBw== 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=zvxeXohXPpAsGvwu7ALFBTn8vSp6cjjBBPdOsMUtX8A=; b=n+/sznICdc8+ewBpOgbOYPEfCKw5RFewsJrQ7gUtRlAUUkjnr6I62TvWhsPR1LYfv7 gHOhrqSMkkaljP3JSzc9nQR1osQi9THaw9BfvHmBdA7H1qYsb5KwzacyKr5fxy9InneQ q6rbq6M9BI/OJsjPtqC5df2r4/QMM10VAiJTGkkkFwDJirO5S5V7wSW0udXPtXiDXWHm 8s+FD7RAKx8UKw5aVPnmT8aaORSRiGo5i+bMNtz417e2dpE5z8xFduPUiT4tiy1qqWvZ yNBC6HAT5gN9SzMK7rjSayNYRxvqMKp6N8nXZ8D03FnMuayHuHOwlLFY72LSNBr/W/ib ePsw== X-Gm-Message-State: AOAM530JynyXimS+e4p3aoieOIiqjMh0ipcErurWRq3CYO1hGwtLr6z7 eUyFpokPc55857hY/Ght7yWvvtF6QMxcEg== X-Google-Smtp-Source: ABdhPJyhWSuGz2W1eZE14SqV63FDWcfL5wrkxs3fbyn3/ey0HV+I/899lSB6f3jP1wRJqbud97C1DA== X-Received: by 2002:a17:903:2345:b029:12a:cfac:3cd8 with SMTP id c5-20020a1709032345b029012acfac3cd8mr1040028plh.26.1625762459325; Thu, 08 Jul 2021 09:40:59 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 15/28] target/mips: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:37 -0700 Message-Id: <20210708164050.711967-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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: Peter Maydell Signed-off-by: Richard Henderson --- 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 ae33c75f08..f22d06952f 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -4948,22 +4948,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 Thu Jul 8 16:40:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365803 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=-19.0 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 0A6D0C07E96 for ; Thu, 8 Jul 2021 17:23:12 +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 AC17061874 for ; Thu, 8 Jul 2021 17:23:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC17061874 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]:52548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xjy-0002eE-J2 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:23:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5G-0001lu-93 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:06 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:34401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5B-0008CS-8m for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:05 -0400 Received: by mail-pg1-x533.google.com with SMTP id 62so6642582pgf.1 for ; Thu, 08 Jul 2021 09:41:00 -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=FItVyri6c20rZDoxu/jPzJDj0+JMz8PeBWfFEbYUUVs=; b=e93mRtznZXmVOpHDvcVPchAxvVEIhBCqAu3b/Npj77UqmDS9/QHWC4Y/j/buJIrxLI U6vUggHkxWV1N1fp0AhB14Z/Y4SN07Na38JuIMn997iFbkEzq3sjC4iWE0ugJTagzv9c lzEWlKksQeVLIYpHxC5DcXSEM2x6isuiHxak/pyHcZDKfLgdQTPlLWlClMbNLbRl30mh 2hs89epCLcSQlLP7IsJX+O0yivtfdRvtQR2YZgxDWG63EIukY7PuxUoVb28BTfHHZHFV tB75WhZYBSaLGjxL2Ei3X9DBDKgpGYCDZx1CXE7VGYJplG6xqsw872ALlgZ3ae3IM1oZ nmNA== 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=FItVyri6c20rZDoxu/jPzJDj0+JMz8PeBWfFEbYUUVs=; b=imTFuRUdfNLtPguncMU54rsawoCo90MlEFFvCpTOmvWEoMhcPgZkHaStgLYDr5esZC pLfyugYtQeYJHEQ385xEWImuO+wURBY7Hh8jZOAIq7LIrviIMKYTJMjwT110tYWQ1kcz U02LakWlMLBf3rum7M3b6aV+TchUUQIM/Gl/obL2w4AkcQgvqElf/COMQVsNXw+pbG8e qxy2TM02lKMvho/6mTbis1ojdsw5v0lC7y6dW+FfzkOEC8PTuEbspq8DGdeNZBhDQl4e OwK1D+z6MuHicIXJ9UJx9Atln5/san10rJ2e5n83jFKaj/Hug3Id3rNc/V1sYhP15Yhy O+Ag== X-Gm-Message-State: AOAM533+FI89Eqr6VAUstP3ejGL0svDbCNTV4ZJYPvM54MHissd+s8Ui nwKv2Tgy+p/vpqn8lAU9BZe+Ks+Wk6tnVA== X-Google-Smtp-Source: ABdhPJyqTx36v6qrrhTTInE63AMIWtRe6gdGTkHGxazrwUjMl18BnLMwEnl4Rr7q/QxkwTb6V/WNbg== X-Received: by 2002:a65:6145:: with SMTP id o5mr32872936pgv.410.1625762459868; Thu, 08 Jul 2021 09:40:59 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 16/28] target/mips: Fix missing else in gen_goto_tb Date: Thu, 8 Jul 2021 09:40:38 -0700 Message-Id: <20210708164050.711967-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: =?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 f22d06952f..8e8f3858b6 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -4959,8 +4959,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 Thu Jul 8 16:40:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365747 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=-19.0 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 8A20EC07E96 for ; Thu, 8 Jul 2021 17:00:46 +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 3B9BE616E8 for ; Thu, 8 Jul 2021 17:00:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B9BE616E8 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]:36864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XOH-0004bZ-9j for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:00:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5G-0001nX-T9 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:07 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:35643) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5B-0008Cc-JE for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:06 -0400 Received: by mail-pg1-x52b.google.com with SMTP id v7so6622142pgl.2 for ; Thu, 08 Jul 2021 09:41:01 -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=ecRVVJ3PnvHarcdzmtFHD+/SxpG+hJSwypTpiV6o5c4=; b=yhKtwvdBIQ5Ny4Gkh8MZRdurVNZs5Q4H8WYIxjVCLMQTzSVPXb8kd74k+zKzJt0svO 1X1jLkkVHeJG2vMxEXhMl7UZFh8D4KBYX0OF5bLnb11oOLdO9l6PhuN3Ic/YJM13A5NR tdUfqp9k0w1BDa9I4uXTGjK2oCDnyQotgi+h8BSywxEo8HHLM9C00CEQbiuQp5YVYxxV h2ABc7GZsz3NxObx+sEBJnuMXyW4HWWqHyzSoesFB27ZishyuDn6P/FGVQM2DB9YYm8+ /Q82KiLVuEU8X8JS9nmKFNgb6Q1vrSKGwQzy8TkoapQGDa28I0Sjo3jO+x26kHQI+psX EXFA== 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=ecRVVJ3PnvHarcdzmtFHD+/SxpG+hJSwypTpiV6o5c4=; b=CfNShhi6gdcVfbBf4Gvlt6+gJsQRihALZcRHr2ZpaISWVNHyWi6lBhSK6hZzAQj/WW 5S29dKWlXKW/NkARM+3XoRoFlEmd6YctRVbRA+d7DNdlrC3FGat8Fn2NcsDwpP4zlaf7 DWRw8IkgRMzEdJR1xLoUNNP8O8adoN076po1kou4F/ttHreDvB5fXu1VIDxfD7vbPFP4 jvau7x0QDagesujkNqwwcCWOtbSvcQDjzg4odnGLB+KJhBCvMOXTvVWihViQjZu2lB/8 LuKgho2DavOAx2Umb6V6HKLgNVKEFNkKD24AU9P6zvD14yfaEe8i0hCios+AuAF4UBAL PM3g== X-Gm-Message-State: AOAM5310pSLnETLm+ayekEVoNLcNlmyQIMsRQFRSyaH5qWtA2pUxpGSL EHLcP2ytnIubtyrDO1J7q+biL0j7JgTSzA== X-Google-Smtp-Source: ABdhPJxQ451cZ9OoiMymtbWj2KYaahHylnV8ar9qvoxccaEBBFbxMHapY1lGYV41is4kGEOy/YKoDA== X-Received: by 2002:a63:3dcb:: with SMTP id k194mr32700785pga.202.1625762460462; Thu, 08 Jul 2021 09:41:00 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 17/28] target/nios2: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:39 -0700 Message-Id: <20210708164050.711967-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Peter Maydell 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: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365771 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=-19.0 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 3C950C07E96 for ; Thu, 8 Jul 2021 17:08:52 +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 E138461626 for ; Thu, 8 Jul 2021 17:08:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E138461626 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]:59958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XW6-0003ZJ-Uk for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:08:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5H-0001oN-2T for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:07 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:38661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5C-0008D6-BE for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:06 -0400 Received: by mail-pf1-x42e.google.com with SMTP id j9so290333pfc.5 for ; Thu, 08 Jul 2021 09:41:01 -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=NbQFCjsTG27rkqKfl9C38LdMPWKV+Bc+MrvnccbRs+s=; b=vlnG8P91wrNP5xOMvMNHvPlIiocspHbaL/Som1ZBcLaWWaNmz6xK2iGyiIukHwZjt/ TN4hIz37ajSRTDdasCw40Z+DLnFIwPR9xBQ1Bjnh9SKKs0flGxOxKVhFW8SMUi5vOYzB c/5jEBIfSz2ySlPWNwBgCQBg6HrMQWhpZwOCV6hXnoANZ0TjrawNQM+yHvu/iu2r21Vn 00lmbaOZgpNvZqI7KB1JS4yUwKQ48l3d/I+eCSiBhReMfblPEzgbRhDW3TAeSyfeGvML QWcqOo5GTKrf/qn/ZbHHsFGhPr0KQNV6XhqVkuzFzwSr3shENFXAE12EzjXieOLB8NLH +sSw== 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=NbQFCjsTG27rkqKfl9C38LdMPWKV+Bc+MrvnccbRs+s=; b=Imk2Z1dAg1q/DXRgNWf14T1aBeEDQSQBkKz25UkS1kdUL2Ii7ReNF1gHhTSAwtt3QC tJ+/NUAFAyx25zU8iaWYpGOKPuww59zpJXrMDUHYWzb8nkzqNDfBMUlyltmMj5RNEWg4 Akb8S2v3uI2MBeO0duTJaGsHepU05ruh5BNBe0KRN2ohIdVxaVuDSxJVA7IidT3UOtz9 8Dd0ZHb1bEOJjX6kNPoB43tH/f7mcyRR+5wRz46T1Tum8PzTqt9QYDwwVNdJxarwcx3h IXX8tsl3ODLHlgzMMwwDSG/rh6cDlDR8FhjrCfPlo7TkS66Xqb5ZRlmfTNIXuquriFIW AWXQ== X-Gm-Message-State: AOAM530LNub5p3ataMEfH39sQigII0l7S7szwPyfQ51UrM2UA5DH3Fgi 4Jqv51mIYupdQ39qVBIKq2nFhJlM9JMPZg== X-Google-Smtp-Source: ABdhPJybsH1u2YPEzX6XWfaO+bxL+z+fTPpP8xBT3iEIhAzsPmXDwopddEUm4UEyZZd/LeX4n3Dz0Q== X-Received: by 2002:a63:f515:: with SMTP id w21mr32776961pgh.343.1625762461109; Thu, 08 Jul 2021 09:41:01 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 18/28] target/openrisc: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:40 -0700 Message-Id: <20210708164050.711967-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: Stafford Horne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reorder the control statements to allow using the page boundary check from translator_use_goto_tb(). Reviewed-by: Stafford Horne Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365777 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=-19.0 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 B2B66C07E96 for ; Thu, 8 Jul 2021 17:10: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 4DAB061626 for ; Thu, 8 Jul 2021 17:10:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DAB061626 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]:40118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XXv-0000nb-5O for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:10:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5H-0001qY-KR for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:07 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:36446) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5D-0008Db-1X for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:07 -0400 Received: by mail-pl1-x636.google.com with SMTP id x16so2419658plg.3 for ; Thu, 08 Jul 2021 09:41:02 -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=zpG+YmfWzszMP9OByCdDeB2WdSQdLuh9f+6ljZ3+DdzpWtnjMbOgQiTZCnkajblU/y xV/8QxHGCpj89Lx3gLoClB6FDawSejhI7VI3Sjn6LVtQ0mINWmuV38moG/tj7+jwE61u zOPIrG5/3Y+fDKEDIxSn/G3Bzrv7/uiFgH67f8K3NP/zJahgvwi+9ssrZSOYby5u4Yrw MIzD+FpMFK69CuoX/f58fvc/2ACiecqb5MZ3ruuQlmDmfBexH727ABXBfr6HBU413uS5 82pZn+VR3meRVfobufxzsI6VLSpY+BQnHb68UXAUUD6aBkYhEFFhomINTdv23Szy4GGB eSsQ== 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=YAn/fnnTSwG0iwhM0XRxduaHJt5MG4Y4DVSOHC/s7MfLV87Sku4fz7eWYx1awyFx6R dtL+XbrBSIICZd76PyAgmLRptkUWb5DSlP/GuRYgBFgD7cNXGUpuUrCaaNgJuTfZiXi2 dsiGl6GyAJ9GCnyJtVHDJOgp3AzaNc1Dyorsf+jZWTED7VgcHBi2XnAW7b6JF84yg+Y4 MvLA4Z37ktVO3LkBQzv3hnY5ox326U0a9xA+B1arK1th3HinrYHyAhfgIK5TOb1zHsPs /7h/9qMPOuRF9jjOg7pGRBb0vPavJKQOxia4OVFcuqBEz+FGHTHrD9GT72HDC+Ua4rrl xvaw== X-Gm-Message-State: AOAM532Xax2bTe7zeKxartD1hBVcmYXhfGgAI1CQVol7u5DREtxdqOCL OAMHtkXibd9utoGMJbEYJHxjHfxuPYVccg== X-Google-Smtp-Source: ABdhPJwdqNYCjh1CoTPfPwO4ppqzBRyE0UMHW90L0g4qEG9NkZe1AuAtveTSWKsLgHRReS3RDF7cjA== X-Received: by 2002:a17:90b:3584:: with SMTP id mm4mr3497983pjb.22.1625762461719; Thu, 08 Jul 2021 09:41:01 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 19/28] target/ppc: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:41 -0700 Message-Id: <20210708164050.711967-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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 Thu Jul 8 16:40:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365763 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=-19.0 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 C5600C07E96 for ; Thu, 8 Jul 2021 17:04:12 +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 74C5961625 for ; Thu, 8 Jul 2021 17:04:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74C5961625 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]:45306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XRb-0001zt-JW for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:04:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5I-0001t9-8Y for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:08 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:42816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5D-0008Dl-Ek for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:07 -0400 Received: by mail-pj1-x1031.google.com with SMTP id p17-20020a17090b0111b02901723ab8d11fso4177394pjz.1 for ; Thu, 08 Jul 2021 09:41:03 -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=Zb5N1ghy0UoyUxGnwRPMVaSwvwp99uQaAF3Bv90d5GZ1oZi+2/4hWKCuXjNymS/Srf /ZFmkEDftVqcl29c6Z8HTG0HtOVCs47G81NQ7EmYaDsXlyq5r4aE6lir5sB9OKr0dryv +to+F6bis6u2wcozoqEC3c8+Gk8NRLf+LRCl6hMaBJLT80ohsBjBWGgNBOC3kLZfNHkA HKamPsPWgIUPe2uDGG7SEYipIYOUCjT1P61P20kABzY2gkNZlBkMYXxAVWdc6Jaw7iGC m6A/yph+Cy2K+qlR7fEwHJIU4FTk6RgbLdrNcEEtZOCLqkX2GPLJ9lqfrrvI5M/5kF3t nqvQ== 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=bOPij3LqsURRzlzsawjhFU0+Scw7g+UKPUB56TYMG8fA+H1U3h/V91gBqMU0ltU/9P hGcgC0HeyW+/g7sPcbs996YJkEyK8zXZq6jBwfQojRO1H/9LTfssbqebOF9bHyiOIIts 5GZAEP6hu+Ku9LV3WF8JO5ALc5lgQQNAjovBL0p4WqnbQlb16KJtN4hUkMkIjgdZgT2c NBAiUOzsyK1KJMcFdK0p24oIx3WPUj0MOjKFPHBSlFIemm01n/TATOXMxY7UVQdVLNA1 FfEIpcLdo7Rf0gorlB6DjR4l5RoX/uJOw+V6R8fAAthDofDvItjb5EL8RN79cwedIkfb 4DaQ== X-Gm-Message-State: AOAM531SVoBJK3PuBSrJIcXpHKUnEgImOyIfUMhOjpINcrhWzPO1eVBv 7HtuECwuGXqR1W4PQPduW+KEnqHjqLGIDA== X-Google-Smtp-Source: ABdhPJyoSF+0qVFMA8BSWW2EXJ8hl2cJLi5bXxaAFVVWHbtjCom3v6dOSlZCCFdD6NoA5GJL9Hr17g== X-Received: by 2002:a17:90a:2e14:: with SMTP id q20mr5703605pjd.188.1625762462159; Thu, 08 Jul 2021 09:41:02 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 20/28] target/riscv: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:42 -0700 Message-Id: <20210708164050.711967-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1031.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 Thu Jul 8 16:40:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365783 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=-19.0 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 629D1C07E99 for ; Thu, 8 Jul 2021 17:12:42 +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 1A5D861626 for ; Thu, 8 Jul 2021 17:12:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A5D861626 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]:48780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XZp-0006Y4-85 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:12:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5N-0001yg-7z for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:13 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:43888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5E-0008E1-1N for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:12 -0400 Received: by mail-pl1-x633.google.com with SMTP id b12so383914plh.10 for ; Thu, 08 Jul 2021 09:41:03 -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=p0XGP5M0/S2fABB4PAMPPK5NzpSQUgfPh56YyyNp9Yc=; b=inADRwfegSKuHBbx2YDG9QijXDCOVLZNG0M1zvT6viBlfiOCcUCsRDiJdqUJp3jsTV EZJtDJ7VtoyVf2BiCZeNKnW9QsA0a4Llvx2YTlgMdAYYNe8QMmngHCSIvfgtkBXFIbAg YyQr02r2j7YqYTcGogXvpWgabxf0Hajn7duB9QEY5qwEkTvqCZBX3IGG/XU467JB9Nmd 6ztIjxxDZJ0xdiUjlKB+ZEPiVKoEH+m5EumKfDVK6cqDZ9lPLHAurevcfvIygb4uhrzN Orjzwl5d3phwodWz/ckcLAGEhJOc/jIctsJL6Z6jN/a4nT9jC3HgdLmP6EcJMEQh8fZv tOyQ== 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=p0XGP5M0/S2fABB4PAMPPK5NzpSQUgfPh56YyyNp9Yc=; b=e/M37kNWROxgk4+f+1pGl5qd5UhqyOzh3OlKCTzRVBGltTPjju3d9SMqLe7EPQqjEr rtfPOAD4TJqfcqP/axUDNtIywOLMNnWObwlXBrqdP75VjOzTp117xcH6/M/IboZgVDBh SRn0mjbJGXckIvBVyEf6B8UQ8bzVAXpAv4AxsGnI6tyf9Raa+1eBE2lFcomYAr6varCd KB9qLi/Ztdl0eVif25oPxb4Vx6r209mIEmZhtJAx9jFq/iUtNaCLGjIcMb3goDzWt6R0 FvyJ9al/5eiOhQD0xSY+LGAMGeoseoH+WgokMCIe/NNYmCbXQlAxof1mpTs+6iLlU/g8 3RIg== X-Gm-Message-State: AOAM532YaxObh1M3f/lYdSGiZ9/GYpGgtuTtbyRfXKKK6CS43vRF+lwK 4UwZDUzehLyf6OkG4YXseNm9JV/WgK7Pcg== X-Google-Smtp-Source: ABdhPJzPmj/I1u0s2Cfh9JPlyHfUfMIFbkTmeV+pvJJb5qnz99WGwp1Gaou11cQ0j/djph9U1Eyx/g== X-Received: by 2002:a17:90a:7f87:: with SMTP id m7mr2669178pjl.101.1625762462747; Thu, 08 Jul 2021 09:41:02 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 21/28] target/rx: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:43 -0700 Message-Id: <20210708164050.711967-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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: Peter Maydell 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: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365773 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=-19.0 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 83AA6C07E96 for ; Thu, 8 Jul 2021 17:09:15 +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 4171761626 for ; Thu, 8 Jul 2021 17:09:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4171761626 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]:33944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XWU-000546-D9 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:09:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5M-0001wv-Kq for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:12 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:36398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5E-0008EE-GH for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:12 -0400 Received: by mail-pj1-x1035.google.com with SMTP id d9-20020a17090ae289b0290172f971883bso5672010pjz.1 for ; Thu, 08 Jul 2021 09:41:04 -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=feiSsJm9roNlYIb4rXwJMU5pf7Fj/o5TmasdZr7ISdw=; b=soNWdZg8zgokGLmET06BEJMuRbxxamsBMsmhibLm8xAKDzKqnHxOpRrhhDgDZhNdpz u8cuTNoqWSLog0/s6T6GFpJMcehNUU9I1hnbr2TRPqYEphOu0t5wCR9cSbXafpIKV75h HqXxJLcJ5kxdOFzb5q0Mj3f3Rk0c1PYvOnJjG1MhY0v1FW7dWdWDKNJnyl7Dw5gBnr7H 6mnJ/53Mdjni0xtgQv0SEXWZwEOpDeBmJrbB8OSZu5lc3ZPD1KglRM+2ew/p+Xpq83LH qNng9fpgdh1ONP5D8e3TurgXl1wXvC8sxU7RmWN3vltm9lgaoq6fYZNkMNeBx6bw4LWJ yucQ== 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=feiSsJm9roNlYIb4rXwJMU5pf7Fj/o5TmasdZr7ISdw=; b=tJcOpkuWOJURrHXIsj4BMRj2mFO0Sun5uqnSITj1yqHuZEHjxAOV9bRSem7xoCBPLo S8H2KIc2DYw+1ccB5fSKIKjiA8As4HOzSUnKx8p1bA6ycF+BJHUCDdFW2qk6W+BgBleR KbSVSTqZ7XYPNjmQUHnTX5ekG0neWetquhKBRZJ/pAxjax3Wkk7Bpz+4GHa2+hOI2Dy4 TIVW00SpE51PSPq2zlcHJYsHqlUPSoYCc9v2QBx31KU9re32INvTFDbFg30TM/qvJffv T5HsKrM8QOAxZmcARSiRDemENeWlTUqDS1hoW6igUOkGYPEwISX3nQDP0FVl0Xgtwxfg Cv9w== X-Gm-Message-State: AOAM533eiNT1lulptgQYuq45ERZ1dzmFTv8EKqS+/Oi1F90E4nRXIaRe NnDFMrPGZEw7U5DMazkxDO7bUOAIruDiJg== X-Google-Smtp-Source: ABdhPJzLPvT926nuzc1bbpLZnkhtH+TxcKFTMZ2dcp4nbOrJl2zVX10FwmORZT21NCcSnWzlxb4gWQ== X-Received: by 2002:a17:90a:b704:: with SMTP id l4mr26805949pjr.55.1625762463348; Thu, 08 Jul 2021 09:41:03 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 22/28] target/s390x: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:44 -0700 Message-Id: <20210708164050.711967-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: David Hildenbrand Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365767 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=-19.0 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 A8813C07E96 for ; Thu, 8 Jul 2021 17:07:04 +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 546706144F for ; Thu, 8 Jul 2021 17:07:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 546706144F 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]:53706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XUL-0007ly-KK for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:07:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5I-0001vD-MI for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:12 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:38461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5F-0008EV-6D for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:08 -0400 Received: by mail-pj1-x1035.google.com with SMTP id cs1-20020a17090af501b0290170856e1a8aso6265536pjb.3 for ; Thu, 08 Jul 2021 09:41:04 -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=uIG9Ge2zjjc1swLSEjOmuiLSgNcwqVn8gkMMGDc8fxw=; b=aVatAm06YxSOSf2cxC1QwpKeFPPyv0ELPDXOIaqHAx2I113TXpkBxqV/+uGium/vBb LC38+3UtXq+gODQzGHWch2CwrB5FgWmhi4UPkg7jAkcRiVv6/UBEtGLSuQg58CJR7Rji wFgpT3IpInUj8fPWja4iMkNTKjI92KQpnEMEWFBchjNKTLW/zOerUxX82OOzCW/fR2Hc Z4rp+AFyeFjcTsYIiRdBM4JOTGs+bYMe5aRPIEs/8/5QZkG5fBLmAEmNxr/FHUHVKrrA nK0yRqKpQ2BxhB+MAe4zF+iKHBXaCfVC0zM8Hrk69WsdtWUjZnvJUcoBwHVrFCT4znHS zqPQ== 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=uIG9Ge2zjjc1swLSEjOmuiLSgNcwqVn8gkMMGDc8fxw=; b=mgsjq2DhHG9JX9U5rR2268hdhKsFkO+5BHcg6PNADlgg2poOqZ7LQHk/41xCFT/thv B/VBPr0QKo8tu26k+ljzC9CYAwrzUb05k3F+nw8jIpP1N0Nb0AkU6gOOyjLncapVwuNY lNxZRtoee16m24LQc7yABVrgxEvW6hbGogX+y71o64rCsAiKb9E0FvZkk5ccQInP8I8u NLytMWO4VqWjAVOPYOMJSgZ0R9zAak+4XpQiTwlWbiXHjNgNI8TvZAHiJX6pei5u26tL kx+uA26lmQ1FR33voDuvFW5EicJh70PAV70i5NllJxoXk4tofMftk4cAPykZ6B3We30v 8hyA== X-Gm-Message-State: AOAM533vZHqEpC91U/niQ7UguO8et6g7lc7DgzKMTPqtThPN0Udjeafe lQW0qHiI4X8QG9MDZ4kBRYYYyQicMYtMlA== X-Google-Smtp-Source: ABdhPJwsboVL4aqGwgPjxogJZs3LS1fzLQVmBzRvovruQDngTF6ZzHfeLVxWBAt0+tUt9XdRy2pV3A== X-Received: by 2002:a17:90a:aa14:: with SMTP id k20mr5855461pjq.88.1625762463972; Thu, 08 Jul 2021 09:41:03 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 23/28] target/s390x: Remove use_exit_tb Date: Thu, 8 Jul 2021 09:40:45 -0700 Message-Id: <20210708164050.711967-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: 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 preceding do_debug test. Which leaves only FLAG_MASK_PER: fold that test alone into the two callers of use_exit tb. Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365797 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=-19.0 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 192F6C07E96 for ; Thu, 8 Jul 2021 17:18: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 A35E861626 for ; Thu, 8 Jul 2021 17:18:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A35E861626 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]:39982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xfb-0002ai-9D for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:18:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5R-00025b-LX for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:18 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:44678) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5F-0008F5-Ro for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:17 -0400 Received: by mail-pl1-x62d.google.com with SMTP id a6so3284385plh.11 for ; Thu, 08 Jul 2021 09:41:05 -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=kUp8uiYeN4pyOFE+omZX4LipnaNlqQ0o8Xf8RQdTh+I=; b=RiscMaj3ACRrujFTRqA0sNySIDuJSvPO9e376d06HIcf2lwBHGy7UNtZrbY2iWGb3d AeOo+Fr48J7se4mYZ6LTJScqqruCoaHCaFU/1v4WBBzcWyrzvUF6aGEHr4i1bK1DPyj8 LdxelG1z/FdFdx+FGbukQGFVJU4i0VJsMk5U++rQtyqIqW1mf6BhtAvPj97W19bDwHaW 4Lnh3ZbsAMINoJvmabart283Qk50grxVLG1/rrYXQxvnREMs8IwIYk0zlOmlme3YCFVl 5pXzm0NOuR+VVyNUQyNiolz7zvpd75J98MZEm7ONo7i7Z457LEG/tg4rONg06j/sxOPc SxwA== 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=kUp8uiYeN4pyOFE+omZX4LipnaNlqQ0o8Xf8RQdTh+I=; b=mLtXzpRZBIEJmaj/zhV9s/0BfMdElh16lfQghldoWqTVqfgx7VT0ahqFkGa6HRT1Ii Fsm+U+2YAO0ypm+ZB0774HYWE42no/G/VpQ1I9bCfNNvrnO4bOD4F0tRWoQc6aAWErn4 ovSCE0FmpamdLbRyuagosvy/555qdWA4N3EcmO70EKWSsHrmkakJVe0+SXWjPVMSP7KX HOPcoEQirmagd6tDdm+jW6L+gxzdKJ36iuuJMBl+dKGDkZZRN8n33NBEfiba5OD3hNWL q17vZqEt43mVXP/T+cWq55cRGyVmzrIJIP3LxbhG/282n9qmRuFF8cbT0ALK3r/Ih+ZS ZMVw== X-Gm-Message-State: AOAM533tXDyZ7vXCgSMiIMnIU/nUPvQJAVjPiV4bCd6loTyNuPU17mzO pW9v15Wp/iI74ER7fGT8PHnO+Govxb4JRw== X-Google-Smtp-Source: ABdhPJyxckKO2NzlgiGtNjNepY+dgcJ7vSQun4Viq0NWL6fQVh9z5+ohO+pHXut8GqAMFF/wP9dNsg== X-Received: by 2002:a17:90b:251:: with SMTP id fz17mr5868419pjb.109.1625762464568; Thu, 08 Jul 2021 09:41:04 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 24/28] target/sh4: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:46 -0700 Message-Id: <20210708164050.711967-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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: Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 Thu Jul 8 16:40:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365791 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=-19.0 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 0357DC07E99 for ; Thu, 8 Jul 2021 17:15:58 +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 B162461626 for ; Thu, 8 Jul 2021 17:15:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B162461626 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]:60236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xcy-0005eh-Qc for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:15:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5N-0001zY-Fn for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:13 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:36457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5G-0008FU-8H for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:13 -0400 Received: by mail-pg1-x530.google.com with SMTP id f5so6602340pgv.3 for ; Thu, 08 Jul 2021 09:41:05 -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=Xh7uVwrgHUDXt7AY95Sn8I5LnzxOoF4dobWodB/7YIm7htG/cBdEpW94p+2t/ryOmh 2/0vswapfk9JZiZ4G04RNvLRowaT7wJtSvLV5wIXxqLmbwKA1rAZjpYJ2uMBjYT7Yhhi xo30E2bK7jWm2BfJ52xSyV2MQR88/RUpG/eRkrbPsk/e2HZ17odZmw0PkGgYWitHHvEi OvGJ71TG6FjEGY7hIhq//jnRlUcBLSsOO2lCvR02TCuMuyme1GuDPafsUNsEFJ0eLJhK FNdoIeQsNDomPQIDWnAMIUWqizndCn9xwYkJP36GG4cg9qmJ2GgY2EOUNgzkw08019Sr lkvQ== 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=i7n6C0UezleQL8QztnWwbhXDCo8CIW5TcwJ45nBrG5P02lRFDpfS5ESHQiyyiPOqZ/ cpoIY8CgjOu3XDtKFDmVDmpDCvXtLgTWh3q5A5Dqrd/BFDQDZQ6ZNEhtO9uxWY+iA/ti S1dL33zE/vHnwLxtkm2LaLvDrRdIFArE4jLUl5iQbxJ59mzD77uDJARwFTckOASDOfH1 bs3Q0j0PKr3Ms5GVXayOwaEHkEMYSmIZ7jmbrZnGuc9DeO0CEbMQuDMY4n/JV0cIyBeq CRjdcyjPJrVkMHCNbUDQNpez0aZRsnNf1kNOlxnupw06QOQQHx/ZNBL9kfLv1FKFDpXJ nISQ== X-Gm-Message-State: AOAM530hjSNDUzdhBTZugdREiSA+qLvnQYLBdQJYPEUGl4oQeSEbR3RZ e+ZVsogkDeHW5Sl5A1PG27+QBWZQAhJcqg== X-Google-Smtp-Source: ABdhPJyEQ6Du+UyCkG8KS7GGBlOsdOiEyii2AQIauY6a44JCDOqd6985yramldp+n5LpGtmcMW6iqg== X-Received: by 2002:a63:381:: with SMTP id 123mr32883059pgd.395.1625762465016; Thu, 08 Jul 2021 09:41:05 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 25/28] target/sparc: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:47 -0700 Message-Id: <20210708164050.711967-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-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: 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 Thu Jul 8 16:40:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365785 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=-19.0 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 5FA80C07E96 for ; Thu, 8 Jul 2021 17:13:18 +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 21409616EB for ; Thu, 8 Jul 2021 17:13:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21409616EB 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]:51822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XaP-000067-Al for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:13:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5M-0001xn-UH for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:12 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:54145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5G-0008Fo-U7 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:12 -0400 Received: by mail-pj1-x1032.google.com with SMTP id p9so3905771pjl.3 for ; Thu, 08 Jul 2021 09:41:06 -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=ICfs3/QbHJc8lbvq3cYZwYHT+/Pg1j5aWpkA86/pSkobvukWMFrHeA5SLs77Xgf87d FzlWvkwaX2Nxagzff+zuUx2klIYq9LvmrqUSbAvXCMvMvnL/Ltv8Np1W5Sz2IymoJImb +vEAU/LtjNOtXYV+wqwsKxyfffFLA/l1KZzZjyEVqxjqJzqrz72kKWjwjSy0Y6L+go5C En/jlPbD4hvXs7ZQJdSHJ/f4Qj8ghKW7wb/vnM4VcStuU4LUc2sqyv1cy+B/VQ8291TK 9ogQwrRuwY3t0L6saK5zZ1f96bOWn76n+xYpbTsl4LxrA6fUDfv+xAyAnT3oY02pCj57 3/Iw== 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=bgEgBGvRIfiW9Pm7MIydDQbOiQjOPS750c4FYnQEwUR1/J3gnVFu95hpI7aJdP6ndX gN8sT1xahTU9oolGXPpp/IfeeV7BG9VO3B+PIzHRWVFOwygvGx/hukY8WArEIg2fy1Xy PuB6R1/bixiNdGdXJwtzN9Di44Kac6P7Z4YsM1QAQxkFNVKaJmCzR2vSVC79CYxdMK8K 9CVV1cdrTdyrPuHGXZspIS/dUghN3XjOrbNT6SBTdOf6LKNVHHkUHsF6uIZi7eTpQZh0 FFzkEdylMakeijT9+WdMuvdUvIpOJiuQOM8J6K2Gr6K+38KGyMepIpGP45WQems3gfhr YOkA== X-Gm-Message-State: AOAM5321O/Qq5/8DSkdDV2X+ZtFRtxcCF2LN4iVXDdmx77npN6HH0sNb J4FeU5Ur4gSvoaFVpUJmJ71N+TL3FLzbnA== X-Google-Smtp-Source: ABdhPJwCdqLNjplMSuYjuJCfgUsjCFNoAqUb6xw3QetblLCamOjsQfIKKlUFzk6iK96z9kpocMdpeA== X-Received: by 2002:a17:90a:780c:: with SMTP id w12mr5747940pjk.42.1625762465613; Thu, 08 Jul 2021 09:41:05 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 26/28] target/tricore: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:48 -0700 Message-Id: <20210708164050.711967-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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 Thu Jul 8 16:40:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365789 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=-19.0 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 806D8C07E96 for ; Thu, 8 Jul 2021 17:15:02 +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 236CA611F1 for ; Thu, 8 Jul 2021 17:15:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 236CA611F1 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]:57358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xc5-0003kM-5U for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:15:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5O-00022R-5J for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:14 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:45627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5H-0008G4-JQ for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:13 -0400 Received: by mail-pl1-x635.google.com with SMTP id p17so2764158plf.12 for ; Thu, 08 Jul 2021 09:41:07 -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=zFLyndVYC8LAF9uPjszS8M4KZEOcr3gGmSkz1Qi5wtwNhJyvnFbecqdezaTvwyOuYk tlYAGC3FNhlT/4Apfnl1jNCO2GDwEfplAzlcRIy86dL6Q7HKmuUA6L+PUj8NOOjl8QC7 q2g2xt6SKDv/ojLUL8URP6P3yGrFmTR/0LLwdVYJkB9sGuFmwJEEJ64M3PL3CWWMyWPk 0hvSd0YBK4l6BWGJLECup8TJAaQVa7Z9up8VPfAeEUIQTe3RRmYEI4x9PHWcX+BnThCt d9EPgBHBXHBgWOphGCYynxTRII9W2jCEL1vFVoTxJhXWBXIukXLYQez5WOePWb7eEdUB m2Mg== 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=CGzN84Xw15B3dTVXOPfUvWHmTzArqzf+EsdOlLMcsEne6/OEQgC9hy14eEfAj0et5R YmQWyjfA5oKCmGC7ljGBlSyGTQ1ga9Z4ST9Azy/352QjkmI+faZp8aGGq0tckij12hOW W7zzIyYCxT55ZBjx9UaTF7uyDrQ9kw0cxPjiX4NuJehMusf3Gz/FEdNM519c2AC+JG2V xBhGJqxuetV0CFXBbp6qZHJsuP7DAMTakszF0MyJGqdSfCGbaUHDeyo8SsqpKtXJz7yx 6AHD3Y3eCGt7DfIbMZreB8BFDNEO19CLndvdL+qkmKmcrijfVG+2hBYHm8HVmMWgPq7g FnNA== X-Gm-Message-State: AOAM533JA3P/pr6s8gQ+sWdNZhDZB0b1Hj9RX7BzXSsDlZixmwgQdMG1 bJLCC0o3RgefE6/FO26D5kMJq6P3KbUBDw== X-Google-Smtp-Source: ABdhPJwv0EwQgglDSQMBeJSL0E7Avk6vmInIRskVhxHp0ZUTKhkRvxaVZEo0H32Ivt96HcdL8Y6pNw== X-Received: by 2002:a17:90a:6001:: with SMTP id y1mr5634634pji.5.1625762466219; Thu, 08 Jul 2021 09:41:06 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 27/28] target/tricore: Use tcg_gen_lookup_and_goto_ptr Date: Thu, 8 Jul 2021 09:40:49 -0700 Message-Id: <20210708164050.711967-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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 Thu Jul 8 16:40:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12365815 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=-19.0 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 92CD6C07E96 for ; Thu, 8 Jul 2021 17:28: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 5059F61874 for ; Thu, 8 Jul 2021 17:28:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5059F61874 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]:38132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XpC-0003o2-GL for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:28:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1X5Q-00025R-S3 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:18 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:36440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1X5I-0008GK-3o for qemu-devel@nongnu.org; Thu, 08 Jul 2021 12:41:16 -0400 Received: by mail-pl1-x62f.google.com with SMTP id x16so2419786plg.3 for ; Thu, 08 Jul 2021 09:41:07 -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=hVn3+LrNnFh+4IEfAFhCu/UiXZDloeqgkTz7HWRu77Q8i3IpB2KgwDsqtNp9S7Kpg/ kLVkSFs2u+va7yzPjHAMCD61uagkvuXpH0SRgv5Buua6wdltKSy2SmNQRzwVaKTp8Aiu w75gAtFmo/TqGZ9h5LwYfxWSCKguCucPVnmjNJWCSn0zDAgV1AgePkolmB22FmCAPROD MIM97Zdc4nlB3lU8UuNS7d9QIdR1cVIIgyJs7WeHzauD7apBBw7tTkJLNWHL5upc/E8O UoPhHXvPLOTNgeU+Juq21gC0rUA4634spjmBO++2v9sffrg/qLHIRTQbgDlhIGqBlaNl 1kYw== 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=irJrkGMZwZGW0hXxFsSB1fI7cmenm5tqBi+YKFDP9y6/A6jqmT9VfVraRszQu1I1Tm 3YRjckcCQCqUSbA+ijSf1hiFblpAKPiX9sFXCk1l/DgJQK+gJoGRVMlgu7n0OCoRopSn ezyc1Q601ELtg6imhNxCzgm+XZX2ouU9L5+Rro42FGMBgs4P/UrJWYvELxR7PjieCwif woarZe5WwS3vRzf3/8ySNFHkaPUtUr7UTzruf4a4Pq2rH57Gg6GsU8SsffddoKJaLdQl gUJhvjX9LuUnWnTkcX3JjuCqsFAD0kJXSB405u6iSBHQtXC63OlIhsk3G8YASZVs0Tcw KwPA== X-Gm-Message-State: AOAM5319xJvwjhmoysJkeoRmlPo1W5Gb8610EQ6oG6jHYKaEG5WVx/cY y/bNId4UM0t/FohWlZvwzNbwhpnLXVhUNg== X-Google-Smtp-Source: ABdhPJwVvctNDfmty+18gOsRkNB9bSxYF6R53njY3Pa6bicOd7QQM9ZSpkRDD0gx0w1FDCq4ICB55g== X-Received: by 2002:a17:90a:4d04:: with SMTP id c4mr5620505pjg.148.1625762466822; Thu, 08 Jul 2021 09:41:06 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j129sm3465678pfb.132.2021.07.08.09.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:41:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 28/28] target/xtensa: Use translator_use_goto_tb Date: Thu, 8 Jul 2021 09:40:50 -0700 Message-Id: <20210708164050.711967-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210708164050.711967-1-richard.henderson@linaro.org> References: <20210708164050.711967-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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)