From nobody Tue Apr 15 22:25:02 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1625931572; cv=none; d=zohomail.com; s=zohoarc; b=DT+pVf/Tusx2aHht/PG/A7CiHWWXCzz0lIXs4GdMBHQr5sIVaaB2lNLedxwolEvAiVUypUKvPj9BGq3lk6WaRlUV4xs3mHO+tUhw1Arp1rU50JAAq10C5DGGNW6ChSmqduiKgf2WZXUQtk3RUBkcFeq0hYrxtqgdIqoI1FQjXhs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625931572; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XCqRJMe+RdTFdeG7cM5qJnxRaVl12uLPvY3JnI4VuRk=; b=mSzuQMijBcTT7lGLk7Jthjrv0aD7ZCQRrT+RBesNnrUz1CIoh3M54jYiXlLAx7z5VXdmqF/Of0IT89+GL4DMzXNf0WaMGUDEPM/bnDQq4HGv23ISBSwRcPMTQbDvB5qiKBS2zi3XT6N7wjO5eAMgur3VnaqE8V6kKOoebUNdj5M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625931572323169.82712486192463; Sat, 10 Jul 2021 08:39:32 -0700 (PDT) Received: from localhost ([::1]:38318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2F4l-0008Eg-44 for importer@patchew.org; Sat, 10 Jul 2021 11:39:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ExO-000560-13 for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:54 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:41843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ExM-0002FS-7m for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:53 -0400 Received: by mail-pj1-x1035.google.com with SMTP id oj10-20020a17090b4d8ab0290172f77377ebso7822189pjb.0 for ; Sat, 10 Jul 2021 08:31:51 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id u23sm11975374pgk.38.2021.07.10.08.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 08:31:50 -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=XCqRJMe+RdTFdeG7cM5qJnxRaVl12uLPvY3JnI4VuRk=; b=nwlCfDEU+AT8OMBSeTIrvwv4l7jOmWubC+VKK2zzeHHX26Z6GIKqXM4kVnF8leugWQ 8c+cV7SK5LRtmFmUBGTYY0h8rer16X+biWFbL3hXNEz98yssyK29i0CnpLxOzR79Levk OTXmlxjLRHUCqMEBmPWG/f8/GLWbPMtpwFlTbyYZNBP0ORVIJKZvHqxuyEOw/JRSKAkQ 5gb12cYUGWsO4umE8D/BUWi8t1Gwh4LJb8H2hShqLqWQeMjNBnh+ArUtx5ZauJ7RPVwA lSG4hgpTggzEBW0YIt4e0hBcp8llQkEjsnhZ6oSA5RBAvvtbWM0lcmDl8sXl5pikjD8Q Q//A== 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=XCqRJMe+RdTFdeG7cM5qJnxRaVl12uLPvY3JnI4VuRk=; b=HbDGKT7gBwDgd5CfvDap8N1YyPc59OpC4fPONNr3ku2Srom77sbn2HLw3pP8nVo+qy Suy8pDVFA4i3Qz+7i06PG1X+9CA3c8XgoxlBYP6Gq92S5Ihib2UoxUg+y4PUz+f7wFti Dzx7yiN4VqNp1CgYOsQXE1WE7bNLPdeSlYVFhJAuRAfp2PLdtRAsaCAKL5yzfSERWj4k JGUS6dDhgt2cH+78+Y/8ia44Sc+5kV2hgb4DIJZ0JleADfC73s5yEd2aaekFS3WVPjZ3 vtTM7ePzPtTdeqKnL7ADX3Y9dYYjj1NawkQHAaW9iKvsN7j3PR5hYU7o153xGPHcEHjd tBww== X-Gm-Message-State: AOAM531jHafFhKdgDnCdmzJo00gVaTvGoDZ5j1XjV9YbRtPnd2iKgsiZ PZchCvMBohnj/xjPYB77dWEpGVI/VcD/fA== X-Google-Smtp-Source: ABdhPJxWQgloEl8cH692D93CgmwT7O04s+aqrZnvn2bs4gRewPdig1Ib+/K9x6r9+RHD4DQiVB8xdQ== X-Received: by 2002:a17:902:864c:b029:10d:8c9e:5f56 with SMTP id y12-20020a170902864cb029010d8c9e5f56mr36119865plt.8.1625931110857; Sat, 10 Jul 2021 08:31:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 08/41] target/alpha: Remove in_superpage Date: Sat, 10 Jul 2021 08:31:10 -0700 Message-Id: <20210710153143.1320521-9-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1625931574143100003 Content-Type: text/plain; charset="utf-8" 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 cb2cb2de6b..bb7b5ce994 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -438,24 +438,9 @@ static DisasJumpType gen_store_conditional(DisasContex= t *ctx, int ra, int rb, return DISAS_NEXT; } =20 -static bool in_superpage(DisasContext *ctx, int64_t addr) -{ -#ifndef CONFIG_USER_ONLY - return ((ctx->tbflags & ENV_FLAG_PS_USER) =3D=3D 0 - && addr >> TARGET_VIRT_ADDR_SPACE_BITS =3D=3D -1 - && ((addr >> 41) & 3) =3D=3D 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) =3D=3D 0; #else @@ -2990,7 +2975,7 @@ static void alpha_tr_init_disas_context(DisasContextB= ase *dcbase, CPUState *cpu) { DisasContext *ctx =3D container_of(dcbase, DisasContext, base); CPUAlphaState *env =3D cpu->env_ptr; - int64_t bound, mask; + int64_t bound; =20 ctx->tbflags =3D ctx->base.tb->flags; ctx->mem_idx =3D cpu_mmu_index(env, false); @@ -3019,12 +3004,7 @@ static void alpha_tr_init_disas_context(DisasContext= Base *dcbase, CPUState *cpu) ctx->lit =3D NULL; =20 /* Bound the number of insns to execute to those left on the page. */ - if (in_superpage(ctx, ctx->base.pc_first)) { - mask =3D -1ULL << 41; - } else { - mask =3D TARGET_PAGE_MASK; - } - bound =3D -(ctx->base.pc_first | mask) / 4; + bound =3D -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4; ctx->base.max_insns =3D MIN(ctx->base.max_insns, bound); } =20 --=20 2.25.1