From patchwork Wed Jun 30 18:32:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468734 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp622293jao; Wed, 30 Jun 2021 11:55:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQts1izlOv3KhWpY+0mqRbbjjtEU5KHOJsodz5lE0H5OXK2CM/HONxgBTxNAqTqjNbKlbw X-Received: by 2002:a05:6102:3a70:: with SMTP id bf16mr34071776vsb.48.1625079309086; Wed, 30 Jun 2021 11:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079309; cv=none; d=google.com; s=arc-20160816; b=tO0/AGt8+hucL55qqwPJ1vSZXCjks5a98GPKIdCT4bgorL/SmBpX9JqRkU6+EDozfD UXmbhXhNCn1jhoYltQZHjFX2fg2FngzaYyTe3qRedAoLKV5l4tGZY+/ppWPRHwQ1Bk+Q 15StUkMn3KgQflK6fNdnDyI6qcNNSu61JIMYJFICcNVZ3GEiVXaYPGknjTZISVcUCnxD gtw73gpP0KxOPe3wyP24BMbSYqP8RTh3Z4kPLUC7OhjYrb5Fb+NzTtNuFFS52jviiV7B 77UvlXo2SMpK8m0yXxWxGtFiUyEChtXR+qWxnpRFUm1iktjTF9YgySnO5/pKguRqTxF4 dzOQ== 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=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=bup9Nybf4nlDHdKvXKUmIEG2HetFk19tUZQ/htumUN0jDUj/T5Cp7mjtS9ZhbrscCl BwCImH6/iMv8MXwPF7vmHc8pBWc4saGaiUfie3svbNd4TDSC+n9U6vwbliJro4EsnU67 K4euTjNpjUfXn7M7HNjlj0Zvf3SWlOpYmUU6R+2cI+qMAAJohQMHg3+8Afv5PJLYsh+x HpYi/8V4q7vy1OW8hxsX7kgYrI9H3igJ8e9IPfJBgWP+yOfB888bbVJJADrJu7V5+1Up WuH6HWg5vQF3p24T+V0jXNjSQmSN3QD/R5oNEKzRP3JbJhIsoBGplCu4VHaKBR3ebs/E GRbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tVbqVrtY; 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 s1si395187vsq.182.2021.06.30.11.55.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 11:55:09 -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=tVbqVrtY; 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]:60162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfMa-0006SK-F9 for patch@linaro.org; Wed, 30 Jun 2021 14:55:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0x-0005mw-Or for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:47 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:44730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0t-00027q-GT for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:47 -0400 Received: by mail-pj1-x1033.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so1983295pjo.3 for ; Wed, 30 Jun 2021 11:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=tVbqVrtY1mBu1QNknzhbpNXI/qBDKp1UL3Zcw/zGPE5xe33gdOuyam9WrOp/Z0hd6l dnl9jJgR1I8PS6BLPlCPhNZ530m5UbdYAEFveo4QMHfWu/N2ptMZTXQhiM2I8iJzgLWq 7N8x45neH6euzRT6BND1MXMKeZkBHGH8udu34R5Tvg7dRk6gkv5Wrcl9luMveiLFoSgM T+iqT8hEVpK6sEn8ue/lPz7kg9b04mw6SDSmABK0pikq8OTPJcpxu1W4Ghuc8I5bWwtR I8vWW+raaVaKnSm8/f8G18q6WnSWsDDnuVWMi0fazNjehSq5gkhApdlxjr7xYS32WzkV y0OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tZb8axAgxZbtOE+ars3KbfwaNr5DhJbyVKuqHiiznqE=; b=iEJZ1BAQrcX8NzFo7LwsIgPoCSh613Sp31MnDBwfzKRr3uLNYefHpdv1MZMWf+HrxJ zKxTNm99OJtDBasBVZQBPN0Z8/Ix9/YcAeG1phuaG6LaPpaSO7P+lrRmi9DCxT7pTKR2 rzgKWNiY84B8BdWn7klVcWrvpJAz7WhY+cOYPfEq1n1z34Bp3SoOCRyliczUrNVISgBm 84lW/coIQRkvlmB58BanAPi99n41hrTrURNHTvesu2w7d49pSf4D9yYRmey+zeH/rgPV hlLlBGvjOzsgmDmm9/+IOf6t8Hul0CjMtEPEqYm33cfHL6k6YS+cKzPqOdrN9Is4y3r0 XpLg== X-Gm-Message-State: AOAM532S9qBhmV1PH8mFreFqLfqRT/bl6/s33Oha1BtMx+aPVQceb3NL /y7mPMyOMIUCwztJbkeMPmIuwTds/wG0KQ== X-Received: by 2002:a17:902:eb44:b029:128:fbff:1e28 with SMTP id i4-20020a170902eb44b0290128fbff1e28mr9495402pli.66.1625077962192; Wed, 30 Jun 2021 11:32:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 24/28] target/sh4: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:22 -0700 Message-Id: <20210630183226.3290849-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yoshinori Sato Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/sh4/translate.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell 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)