Message ID | 20210620213249.1494274-6-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp1985341jao; Sun, 20 Jun 2021 14:38:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNj8ox0G0raelUn46hU093E9FO7ON46f/HxxZyXqO6f5pSRE+0daWLaSo0OtgmrLM4F3D6 X-Received: by 2002:a05:6638:379b:: with SMTP id w27mr14769503jal.108.1624225127468; Sun, 20 Jun 2021 14:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624225127; cv=none; d=google.com; s=arc-20160816; b=wzZ+s9c0gZYFGBpTl2TqkkivOoBdhg8kvzUnZUU7ynnOQECJD8/xJWtF7DuApWQGA5 6sl+bpvE6pqMqqpIVl99HhUocFfBs2qirDpom9fgUv5N1a0sSzARKNh1f2RCUPOrkCcN MBvxWXIEYIyp6DtCEPYHVBPSQPiEzqR71q4ZPVjP/tT1vepHUMpu2ux3mF8A7t4e6Uq6 nMii1zReMVSw4/KtiolnWomte0FbN3e5UCvp7TQU13jDt8Ffv6WzB8GWFc30kAE49X+B etcwnN+v5foKTELwioOsnAR+OgnyxNB+ByQtOPkw7PFJytKLM275Bfv1oeTuvkDz158h 4SMQ== 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=7dML7HVO3SIUvu7+ZiyMAW2r1aYzDyVht2iysbBCWL0=; b=gUIU/N+5RQMYj02+xNsc1XOtFZZNdZ+gHb94696EgbYsi5Wc3U7+77eAa+q/GBa7L4 IklWNhYl3ymXiW6+rv2HZ1PzA4Gah14sdkDbxAPLfJN80SFar4m5uxAmnNmHrtHY50MA rBT45Hu6JuQEUUzmFgNVyJFJMx2xpzY40m/XLxPMG3SOd3zV9NhBnLY3s5FR7esndg30 IKWUByrJCSnHqdi0zty2+JoxA3WYmJtIveauGY1gjqKEjru8lDsbnnbv5ZFIl4AKJQ09 s22dNcSbRIuW5inJ02c8qTwsvtTOR2KCPVKwDZR0W3J0G4HMbEiNfu458aM2mcPnDyqz XwJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DTrvdicQ; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g9si17662225iom.21.2021.06.20.14.38.47 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Jun 2021 14:38:47 -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=DTrvdicQ; 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]:55660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1lv59O-0000bl-T5 for patch@linaro.org; Sun, 20 Jun 2021 17:38:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lv53r-0002J6-Si for qemu-devel@nongnu.org; Sun, 20 Jun 2021 17:32:59 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:36437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lv53m-0008TB-Dl for qemu-devel@nongnu.org; Sun, 20 Jun 2021 17:32:59 -0400 Received: by mail-pg1-x529.google.com with SMTP id e33so12528487pgm.3 for <qemu-devel@nongnu.org>; Sun, 20 Jun 2021 14:32: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=7dML7HVO3SIUvu7+ZiyMAW2r1aYzDyVht2iysbBCWL0=; b=DTrvdicQDUOCoFBJXoZqja3HB1XdWqMYYHnE34/QkQQ0bX/tshffG8x/kv/KCSn6oP hSbmJ8GEknmLoQ8gFF8kzdS5r9vb03dWCZK0wWQL69JhcezLWHoakf8bvcCnOHjhYdA6 /J6liarVUZrX/N5NucsjkdPvLDa7sbCzEv3uPlHBhbAjGNZyoE+jghY1NOZpWqsT9NfG LpaRwA2t+Aw/v2Qcmr/DULtCQSj113JQDp5YcSo/iMfIL73a/Apx6v1dIRCsq31iPimG jnx0fbh6TKslacR5m9zrXCX5kk+X+0ppKtDsjJqaV1AHX94jtNmWZ7z9SktnJ4e0rzNj 4fZQ== 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=7dML7HVO3SIUvu7+ZiyMAW2r1aYzDyVht2iysbBCWL0=; b=CCPTgjwx4OBUIkSCevCe0Pqpm3jqZMGbqaEUxqMRpT8cNppTSSPeyK6z98NhCL3wGA DWhp86G3fejGkj1iuE+VzBXfdkUrWTjJATsNFSn8Jiyw2dxepr5tkNzDO7r5Og7D4T5S nZzhApEqCGconWvJJmxgzxTsy8rTHEBizqu56MCGABwg02eZUhKYq7+w7JAM5upj2sD0 2rPViypU9+SmFt4hjWSAmhSjP61viPGXl2vpR7wrDWj5QUwUzrsorFpTl0H06TM3YcGJ b0TErE7bY+e+dkQK/2g6PT/t94A3/lY+DQ4JuXALwp7KitAJ1h+C8RDUA/s4EJkmL2g8 I3jQ== X-Gm-Message-State: AOAM533tPw0Emwu+1XDkVIR0k0aFV2K3sQNUF/lrZzWmiqLrxX6GeCQg FR7ILod/2U/Jkp0lgV4k5f/eYcyn3qQIKQ== X-Received: by 2002:a62:1657:0:b029:301:af69:5ae3 with SMTP id 84-20020a6216570000b0290301af695ae3mr6472800pfw.57.1624224772793; Sun, 20 Jun 2021 14:32:52 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id w21sm13608329pfq.143.2021.06.20.14.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 14:32:52 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v2 05/11] target/cris: Fix use_goto_tb Date: Sun, 20 Jun 2021 14:32:43 -0700 Message-Id: <20210620213249.1494274-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210620213249.1494274-1-richard.henderson@linaro.org> References: <20210620213249.1494274-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: edgar.iglesias@gmail.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/cris: Convert to TranslatorOps
|
expand
|
diff --git a/target/cris/translate.c b/target/cris/translate.c index 24dbae6d58..9e1f2f9239 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -524,14 +524,9 @@ static void t_gen_cc_jmp(TCGv pc_true, TCGv pc_false) gen_set_label(l1); } -static inline bool use_goto_tb(DisasContext *dc, target_ulong dest) +static 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) || - (dc->ppc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif + return ((dest ^ dc->base.pc_first) & TARGET_PAGE_MASK) == 0; } static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
Do not skip the page check for user-only -- mmap/mprotect can still change page mappings. Only check dc->base.pc_first, not dc->ppc -- the start page is the only one that's relevant. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/cris/translate.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.25.1