From patchwork Mon Jun 21 01:34:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 464475 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2114335jao; Sun, 20 Jun 2021 18:41:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNOMRfnSjDu6xHrRIwvlOqelvGXi+fZlDKhzt76ThjqSprm8PkoZUwuF1cnTaB5uJ6PfRb X-Received: by 2002:a92:a302:: with SMTP id a2mr16001971ili.184.1624239674443; Sun, 20 Jun 2021 18:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624239674; cv=none; d=google.com; s=arc-20160816; b=dKoEhKOEMgN1bukvonTqOCFV7nEWPhEYpAWK/szdKCjGf03wV7kJn4O7Pwy2TfqOfn K3f+9KaDa9Ay37SDap3Oz6d1JNW87rOa5GuZU63yKc2yudzYvoGVxjAzWPlt34T9g1mn YaKUiIX+gDR0vLb0Jx3fW0NlFEYjZGKiRSCTvDfttkt9Gcb+l2GuQp6NV5qC4SSrTyku r3Dnygh9sdHmtudb8pA3HrXTuwDERWGm4iugD2WysghZCRo5aei82mSb7fcOV6q5BuiR /iSXFUgMUhVnCiSpFoG+n8WtsC2NcT3znMbVy9+wKCuq5Ob4Hi6d00XbipXJV0Wv2lmM Iy+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=XmpHG5qWHga2DrUxm66yiT1xDZZbA3TthH2EU3CwRBo=; b=SIMcRmnFMeufJ3/Gjtx7PFZ1jMtK9Xro79lVYiSy+e1ZdUdoViJenJFEZW71KdGq/3 t+I6e9iljtZNp3RCywX0JIE5jUZe/R1+GYKSsRGqcNDxMxes5ie7YHOrocBVdb/uC0jy TOUWEzUlH3fe6AFxhbKY/ReMnimkRKERug/Ks9Jrcz4/JxnTRHTKDAMXi77GLTEEd+Ki t/XfnA0eHqedPmtLtLzkKgT9pcwZBBRhHj5ZA+xS8mFKu57ko8qfbygfcJgDZvGvV3tK oLZ34rVb/BkJ/ilBb0pd4WLC5EYV3SF1IhVJEEfre4fa2Noz4FBWtwJfcdq+OVaPKrDX HcLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xylRNmWb; 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 w10si8996171jao.68.2021.06.20.18.41.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Jun 2021 18:41:14 -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=xylRNmWb; 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]:52042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lv8w5-0006eq-Ry for patch@linaro.org; Sun, 20 Jun 2021 21:41:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lv8pu-0003iJ-HV for qemu-devel@nongnu.org; Sun, 20 Jun 2021 21:34:50 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:39635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lv8pn-00058s-Vg for qemu-devel@nongnu.org; Sun, 20 Jun 2021 21:34:50 -0400 Received: by mail-pg1-x530.google.com with SMTP id w31so12830908pga.6 for ; Sun, 20 Jun 2021 18:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=XmpHG5qWHga2DrUxm66yiT1xDZZbA3TthH2EU3CwRBo=; b=xylRNmWbryrU3eyR/TMxLe00WWDmc0rbCZu2gTQXoUkRQCRg0+/SctiCCGQ/YEPC9w eAdwT+cjOhfQyxmG028poOZMJGUJlZo4HRBn7DmaZPFGKiKBW9UCI4kLxhtY+I/fgl/J TsDhaNG7RawYYgnpqz4aX0OG7nYV5PLGmM1QyAyu6pXHYYu9ZQTmHbfFDDsidhcGf29E xCIJX4y1PQ4j1ZvS6mS4n7i6WwnwEkRaJeqyCIx1qGfAJrau3uvADCwmqfma4OoPU/YP TyWELAVbMRCkK/V/UTYeG+HAAvqheBObfglGTqzo7522I0hQ1vKTLRrhyog8dr2qjXrI 8T/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XmpHG5qWHga2DrUxm66yiT1xDZZbA3TthH2EU3CwRBo=; b=UOMCOT6Lqm/CrIm9YJxZwbqPYi+70Oze4f8TkfUoU40MRhgyQIySjzu62uHsCmf5eD aUfGkNOVccjrIWYjTIJl/fpLYDfycupavdJeYLsfylL4Uz6uMrq5xpcppv1Jl2h/7fJM Q8jSW73LWxz1tRHJaMgGWxdRu7Unl8jzkd3674qYQgOflidM7gD0XZ7fg+1jNwBiA6oG sKydQUU5dl9EfRifwqapJU4KeyOtlNpuEamrTuM4XeJ9r2rxJ7U8sh4L0qi1PsVyWpY9 GXzQNdd9GyXIbPmc0SqIQI1B+LiDShkH/OojtYicVJ7MuiTDHnhzSBdDSd7lm5QgymP8 aEPA== X-Gm-Message-State: AOAM5310lU+a6/aeVQrrKru8NW2yuJcytAkoI9wKqiztDEdjAgEnu8rk q510NzxkV4NYFHugLAv3MHY2K389esF4Dg== X-Received: by 2002:a63:9f02:: with SMTP id g2mr21617381pge.141.1624239282769; Sun, 20 Jun 2021 18:34:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id s27sm1495628pfg.169.2021.06.20.18.34.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 18:34:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 03/26] target/alpha: Remove in_superpage Date: Sun, 20 Jun 2021 18:34:16 -0700 Message-Id: <20210621013439.1791385-4-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The number of links across (normal) pages using this is low, and it will shortly violate the contract for breakpoints. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) -- 2.25.1 diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 70ba4a67c7..6ea19a1d4c 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -439,24 +439,9 @@ static DisasJumpType gen_store_conditional(DisasContext *ctx, int ra, int rb, return DISAS_NEXT; } -static bool in_superpage(DisasContext *ctx, int64_t addr) -{ -#ifndef CONFIG_USER_ONLY - return ((ctx->tbflags & ENV_FLAG_PS_USER) == 0 - && addr >> TARGET_VIRT_ADDR_SPACE_BITS == -1 - && ((addr >> 41) & 3) == 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) == 0; #else @@ -2916,7 +2901,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) { DisasContext *ctx = container_of(dcbase, DisasContext, base); CPUAlphaState *env = cpu->env_ptr; - int64_t bound, mask; + int64_t bound; ctx->tbflags = ctx->base.tb->flags; ctx->mem_idx = cpu_mmu_index(env, false); @@ -2945,12 +2930,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) ctx->lit = NULL; /* Bound the number of insns to execute to those left on the page. */ - if (in_superpage(ctx, ctx->base.pc_first)) { - mask = -1ULL << 41; - } else { - mask = TARGET_PAGE_MASK; - } - bound = -(ctx->base.pc_first | mask) / 4; + bound = -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4; ctx->base.max_insns = MIN(ctx->base.max_insns, bound); }