From patchwork Fri Feb 2 05:49:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 769131 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp753454wrc; Thu, 1 Feb 2024 21:51:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeLfmn+9qcqPlUA4HeYgqAuTFNsYH7ThuRoS1Ck85QpgWv+5d/ACTieTs3A54/k5F0iyBL X-Received: by 2002:a05:6122:4a85:b0:4b6:d652:f80 with SMTP id fa5-20020a0561224a8500b004b6d6520f80mr5263917vkb.10.1706853093456; Thu, 01 Feb 2024 21:51:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706853093; cv=none; d=google.com; s=arc-20160816; b=zMy4zIHvTcLbXqO7nF0jP9roGn02xniHQc5s+EH1JVXNt3qSDs+x7HaQWZhaFc6+Fr bNvJq84p3cOgd3MSkTAZSUKTa5N4hvQKyEHbsNFmzbBiPrFKitY8Hp9OqHaZBJj8OPh/ 6Suh+eQ+wOZBOw8JL4dfL3o19HYLhG91+ajlfeNGnGTDpWjs5AoMD5uwY9KB/L3YjASX HHWBJ3dtf23Qysrz9QFog9sRBgWyebXfRx/tlQWBQRPFGB14thy/yhNg+j5WgcbFCAsb OcYIURUoLyMYjNy7nE+szTSgrn/1PSSGq72QTm6/UJXkTdIE6MRhu4UmYqxuVyV+UDwW P+RQ== 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:cc:to :from:dkim-signature; bh=Ih9kNFtuKNhrUdysAgLO3jiT9TTjcwOFp1g4b3mJWUA=; fh=oLGRNvUE03KpaVkpNva/mgTSawTNVt3OVO9YnS6THhs=; b=shD2RIfLn9WFdJo3spBLXaWubQGR01qMHE2+3pTabJTzpNDHLQW6TsEfpIcoUEv4qZ jkFzKvp9nHiDDGZT2bsTHPXPkSADb4b8rJlj3Z2sXv+pNiQONaj110WwwZxiZM7h4Irh p1JqVRsc7iTLFKzrTjaknNZ9eFcLuKGRIA5/bMKj1TNiCuqbqPgeuCbe3XkzRv/3LxfH tODnOogUrJzj8TBQEfLVfx3OIGLbV5hD9PHIWLp9yjCm5pVEsVcAfL7IRU2ZzEd/AIBq Uhy+2JW7pRmq6/v+DbJoyWxMHHyE0zfRWcdzRf8wMg5Pq4v1TAE4ZtlSVNxYYzt2OpLE 6BQA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QgTHM0Vp; 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 X-Forwarded-Encrypted: i=0; AJvYcCUKT+uiQpy2LiD55p+Pl0RPjp6jX5K+mYWeu4Y4YJ4gvMyjOhQtH1xGdcOn+RBpbY+AgeFjANoH60EqmdxxvX+E Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z6-20020a0ce606000000b0068c71af7279si1333612qvm.282.2024.02.01.21.51.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Feb 2024 21:51:33 -0800 (PST) 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=QgTHM0Vp; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVmRv-00014K-5e; Fri, 02 Feb 2024 00:50:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVmRt-00012n-QO for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:50:49 -0500 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmRs-0001bf-Co for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:50:49 -0500 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6de2735151cso1229867b3a.1 for ; Thu, 01 Feb 2024 21:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853047; x=1707457847; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ih9kNFtuKNhrUdysAgLO3jiT9TTjcwOFp1g4b3mJWUA=; b=QgTHM0Vpf1nqXtlqGFg5C7e4Br9r1TKRpZOw9aXUsKNrai2KIVbkEFgsuPAS68soK0 7p0wlEEWUObisjPvHWkwhe7+AS1bCSxHjwZGSDwW3Kgdz+KDpfwjbFcXP6/9kWnyVBWb 2DQwMLyG5OT40aBxZ45MxHXR9CYIxsK2SnqmZLX11SQn8DyouDJ8Z5TDZo1KFM5u3oT8 4bKcTesW5WneG0e+Dtx4DtAzhtgqObHas4eSs0BlZ5PTwY8BCLFO+4n4Pvz/M7hmqpt7 rEGKyCVKwn/Iwjh5FYes0ckMDXobWEPInET5C6I8gHj5SygyARYoxIFLro44n2EbHsVt 5NRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853047; x=1707457847; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ih9kNFtuKNhrUdysAgLO3jiT9TTjcwOFp1g4b3mJWUA=; b=Q+72sb3ojkyei69D85Wep8zKL20nuNrwGKdWJAOXytN8kv5II0jb3j2Z3wLXYIrNNs dqEXWToXgifZ3/LLagor8yYQuudYpDUMPVyc6+9XS8eJlzSYjgzr89nXXfMcxgAv9PCa LxUKzVyhNi2WTjukU1ZZ6f6NuAXOGf8nhy1LnCBqqxwYDYdj7G3Q1oq2eZ9IHSn1h6is haqR7/LzNoOlIRlT+sMXkbRFBG3j1w0rHhjTipOhPjCtlHVBIJBuKKZThaWpW63VUcXh zjwtAGkV/7P8lzuFyManh3LStf2iOyvw2RlP+7pwRQbQ7OMIrpDTvWsZJD8Zlw7QOnEA h1+Q== X-Gm-Message-State: AOJu0YyDB9Sb7fQZqU8kMfz/h4UgqeJfGelj/5/lWGr7pTN1P7DNn+Zf KAA/drOOpXHHwgQFuY90PXJjYA/8jxelSUjMReeU7r8+xXMc3hlYLRtb+1sDJRWEpIGdTKMGODu neAw= X-Received: by 2002:a05:6a00:1407:b0:6df:f634:4f83 with SMTP id l7-20020a056a00140700b006dff6344f83mr1776559pfu.2.1706853046932; Thu, 01 Feb 2024 21:50:46 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id h2-20020aa79f42000000b006dab0d72cd0sm715111pfr.214.2024.02.01.21.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:50:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/57] target/alpha: Split out alpha_env_mmu_index Date: Fri, 2 Feb 2024 15:49:41 +1000 Message-Id: <20240202055036.684176-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202055036.684176-1-richard.henderson@linaro.org> References: <20240202055036.684176-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+patch=linaro.org@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 7 ++++++- target/alpha/translate.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index ce806587ca..3beff2738a 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -389,7 +389,7 @@ enum { #define TB_FLAG_UNALIGN (1u << 1) -static inline int cpu_mmu_index(CPUAlphaState *env, bool ifetch) +static inline int alpha_env_mmu_index(CPUAlphaState *env) { int ret = env->flags & ENV_FLAG_PS_USER ? MMU_USER_IDX : MMU_KERNEL_IDX; if (env->flags & ENV_FLAG_PAL_MODE) { @@ -398,6 +398,11 @@ static inline int cpu_mmu_index(CPUAlphaState *env, bool ifetch) return ret; } +static inline int cpu_mmu_index(CPUAlphaState *env, bool ifetch) +{ + return alpha_env_mmu_index(env); +} + enum { IR_V0 = 0, IR_T0 = 1, diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 134eb7225b..4b464f8651 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -2875,7 +2875,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) int64_t bound; ctx->tbflags = ctx->base.tb->flags; - ctx->mem_idx = cpu_mmu_index(env, false); + ctx->mem_idx = alpha_env_mmu_index(env); ctx->implver = env->implver; ctx->amask = env->amask;