From patchwork Sat Jul 10 15:31:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 472336 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1363609jao; Sat, 10 Jul 2021 08:35:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhUDfff06JyT7BlvlNngCKmZpGj2iJe+pcDcjS0qkcE7wgE+RBDNYJOCoWGXcENo6v9g3V X-Received: by 2002:a67:887:: with SMTP id 129mr42202067vsi.23.1625931339277; Sat, 10 Jul 2021 08:35:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625931339; cv=none; d=google.com; s=arc-20160816; b=ZiFRMKfh2+P0/51ccmkQr5j96l7dFact7QvbBwn/c+YBiG2ePiLuvxH9GxECstSHBZ SdkZH90yk+Y+9v7RxJX4FCl4cm7wUkVVYCaWPGVnye+WaWOaJZj2POvhU1ZvveD3qQLI TDHJEN6XX3/nu2CV83fIr610A2nxonktUi13oRxnFcEG1jY7g9Zx9c0wT6WcIyI0Z1Z+ rFHwv7c/eJ+vkvjljt7R7J0+e2BS6EQI3nnUv5ahk+7MMuxjACOmKstGmg9EGrZEOkj+ 9YXVhed7e4NRmgYMkgbUtJHEc98Nzakn0gOtsz/E09Gq5VGh255Y0peGqTyDzE1pP3CA Lm8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=k3KB/Tkz24jiJG0J6xu6GsoVxf3biKKstX86Aezy0Ms=; b=qQj7LqDjEq2tRMoNOMhH3sFOyfoEbE/MSyvBhX+cHq5TA3xn2A+DXVXaRDX5FeaWfp tT+zDFbiY7XyCWnQgqvLImhkTcJYv17mJxBMIO7FlrafRLtc4vc98rff1jA/QWwENMFZ 4RZr441rK2UdGaAxhTjSEsmzffkK2emBVt42oBZJRPRYxSaumoYS1RfO43Rc+DZkJOY1 6g6kbg9p3zxbsZsrsPf59+VU4lJNOLRY/GafPxplHUUyVxztBRRynDlrGVx4sp3QVVNW b3lTV0GzIwRYbR3AZYlLMSxRtnUOfeO0eeQcrTFzsrtQRAkoBticPay5afMZAThJibGy 59qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAe2sx0h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ba15si10130937vsb.175.2021.07.10.08.35.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jul 2021 08:35:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAe2sx0h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2F10-0008SM-M6 for patch@linaro.org; Sat, 10 Jul 2021 11:35:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ExQ-0005G2-Rn for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:56 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:38564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ExP-0002Hi-7P for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:56 -0400 Received: by mail-pl1-x62e.google.com with SMTP id u3so1515796plf.5 for ; Sat, 10 Jul 2021 08:31: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=k3KB/Tkz24jiJG0J6xu6GsoVxf3biKKstX86Aezy0Ms=; b=AAe2sx0hx4GS4/VBdE075MymUp8Qz5UJSVBAjFBiEr3m3w1MxwFbfhekwxil/9MQF0 se2uwvnOIhg9TG+SGybufMzOZiCzJZOzzeqwh6UvAYGf85lAS8yyiSq9Rtxh+tCWFkG8 t3VEXz764DczZqVCqwHufQV28LFpIac/wEsdVaIGmR+MMlcVxG+skbOdjyghz0gyWG0U u1/ByyX9+wQNmK/5SZQdVpBHGkYFO2jSks6b6st2/uXVMmOeSJMkT8nuaIjj3Tp7ezIT EHpkw/He+rz5Zuq5MaptgW0Dhvwtkw1FCT75r4CGlAvSwyxxhu1ZJO7pVunZvwHIHlvx H4ZA== 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=QoDfDY2Q5TLQJd4d2kZntdUiEjMhkICPakNNLj5++k+ION3YH+GVjFJW3PGXeEZ9eG IHpKLkgXOXsEEb6//4nLt6kIeqhvV5yvxGYlnCgT1DI7ye7uSGRqneH0Jo0/XbI9rG/Z 5zolIHrWHODOOabdMXKnHnSTkjxlTe9+5scipgheVyHjrL2+YmyprNckYEHLZv4VeLl4 pdKbPsTPKXQ9VzsLZ5AhkGFxF8Xe/Gh3GWbBjH3aNemwPb8CJQADdZ5LkLf9YmQfmhYQ z7w9lEXK77FpJb5F8T4Mp4EpgmkT0IQo6ajoxTwbe6IJmEDxDQU82ZzI4ZHa7rBnAs6G YheQ== X-Gm-Message-State: AOAM533ROY4aPqFmWP2uE2AzOAfp2Xc74cxRkbyURDM8m/esD9ERJJ+B tZ7G//9IBKvZupKWXQhqULN04JD40hsQGw== X-Received: by 2002:a17:90a:4e4a:: with SMTP id t10mr44057558pjl.173.1625931113917; Sat, 10 Jul 2021 08:31:53 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id u23sm11975374pgk.38.2021.07.10.08.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 08:31:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 13/41] target/avr: Use translator_use_goto_tb Date: Sat, 10 Jul 2021 08:31:15 -0700 Message-Id: <20210710153143.1320521-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210710153143.1320521-1-richard.henderson@linaro.org> References: <20210710153143.1320521-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.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(-) -- 2.25.1 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; }