From patchwork Mon Jun 21 01:34:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 464465 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2110913jao; Sun, 20 Jun 2021 18:35:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOeLu9SlkRFQcxulgwkuc5lC0boGRIrAlLpq0IuYBRoA/FOszN7PUfK+qyiZNXj5r3uGf3 X-Received: by 2002:a05:6e02:c7:: with SMTP id r7mr8547662ilq.76.1624239320796; Sun, 20 Jun 2021 18:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624239320; cv=none; d=google.com; s=arc-20160816; b=QGeoiXs0IMnUMcTHh2kMUNT3ttUxUZv6v6jkcZKh56ewjaQ2fNCEgMsWMKppj4EhUe 9ekpgoreiDx6OKCHEP3Jcta3yLitxe6k4HfEN0sKmqDa92Fpl+r3qHWeDtkt4itdb0N/ lQj0NLa7PxyPB+hSn/51eYZ03A1eBEHDrVKBrHuY3bKNIsJtgtkDwUt5GZ/YVYW8BAuh RXX9F/4RpgzDTrqdq2Gx/Xn8mHSWw0vBIB4xX38Zi139de2bzdFRBspjPodWjiMCYXRZ kGPRHV5mplAbSS3QzlDJVmgsTJpF3rasDogQfHj9EHcveMKG+xMkPRYmzqlaxAmlajZo R8Bw== 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=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=aVr9GTS+x2qDIKBTGLBZe0W/lSJwMG9jyfjhB1tG4xEjHkW5lJheBOlTwy1U1NoNlB evfXJ7Fq8/EQA6Cz5dIMZXR4FeRDAZv9grymXHJKp1zHOUPJt2nxg/GMYDyez4u/2HIF fXzF9yOFHjwOAbw4rD5GuPGz6Jh4e2cG6TH0x+vmzo+jgZI29AcQStJwZDPKxO8eEZza uJQeRIJOuknQgjcrETbsUwhIsNN5Wtn6LXIWQ6iT1Y7cHppcjUIi4D98w4HArO4zASwc +MEmedjZQNMPYg4vchdy68GTW3x4sp4NJTkc2ZqXU1Jng4hKxr0UhMb0V4L8XCbZnt2A s9xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M4I3DRen; 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 b6si9474058ile.24.2021.06.20.18.35.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Jun 2021 18:35:20 -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=M4I3DRen; 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]:35542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lv8qO-0003sK-6M for patch@linaro.org; Sun, 20 Jun 2021 21:35:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lv8px-0003n4-24 for qemu-devel@nongnu.org; Sun, 20 Jun 2021 21:34:53 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:39638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lv8pp-0005Ak-Pg for qemu-devel@nongnu.org; Sun, 20 Jun 2021 21:34:52 -0400 Received: by mail-pg1-x533.google.com with SMTP id w31so12830945pga.6 for ; Sun, 20 Jun 2021 18:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=M4I3DRen5KFnW0x+9OukwYD1Je20YCMqH2ORkp0fb+Iv733BWZSOx4gvsYGQyTxIOl YCx+pzgDbunXrsoAe6eY9cvLj6QFIkKguZh+7PYLgQLUAOEqukAMZQBC2V+iALATaD0B ETdMJly+BLzOAQsO0FHxHcZLdkLcUxcCXnRBLuahKWhYQzwnH4X080/JjOOGnw0O6Am9 t7o2tgJiPl8/lAkQYNCvhc9SZBDyYmEGDiVzCjKPHE+MOK/cExXbQYpYtzmRJapQ8+4n eMCkNaV9B7xaOUnCMdCtaARPxu/3FYDtRHWo8fYsXIMb8VoAArV6o5LX5pijWCJMrEtQ rBLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8W3E8oUQSB677QQyABV7B4p2F0hPm4epmS7TTIJ96Bk=; b=rPcXR1KTRMy0xl3wSw0b8RJYWY2zV4fRPsqsQ9L95H9va+YL9kxAeAvdiodlYl5ttb 4d7DwXpQy/xeB3M0P3ixg7q+cjCaPjtoRMk9eBZ8Ydtv10st/yO/+fo7TFkEeLf3V7Mk cydtPdEPrkWer0zPc34YwCZXfiIYbRuorgs7PRn0C0xB3ufzU2kgas/2pGJZgZOPvbQn DIMSVtx13FHHP1AJoB3IFtKDHd548uYPoZUBhvanco2/Z7XbLjJ09LSo0H1hNMevm+TO 8rDCvvhAx3e87/Qxe5S/Ui4Jzz5Jars+VNcJf7G8dRu7TJcCFCrRKVWzAZTfFGBhl5yA m4Ww== X-Gm-Message-State: AOAM532r2iBQJIhuDkm6qEfIa/64ZHbp3i9dsDqISmUjRqmKcKxR+MKr L+89RZ5fZNdW90XGmFEauKUTevn8eSw4NA== X-Received: by 2002:a63:da0a:: with SMTP id c10mr21433072pgh.255.1624239284611; Sun, 20 Jun 2021 18:34:44 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id s27sm1495628pfg.169.2021.06.20.18.34.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 18:34:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 06/26] target/avr: Use translator_use_goto_tb Date: Sun, 20 Jun 2021 18:34:19 -0700 Message-Id: <20210621013439.1791385-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210621013439.1791385-1-richard.henderson@linaro.org> References: <20210621013439.1791385-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: Michael Rolnik 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. Cc: Michael Rolnik 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; }