]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/alpha: Split out alpha_env_mmu_index
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 28 Jan 2024 04:47:19 +0000 (14:47 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 2 Feb 2024 22:52:25 +0000 (08:52 +1000)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/alpha/cpu.h
target/alpha/translate.c

index ce806587ca1c49cb0faee0041de9c6376384a6e9..3beff2738adebf33a24c5b2aa377ee38f1b24441 100644 (file)
@@ -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,
index 134eb7225bd443dba1437e3b375237291588b9d9..4b464f86513a59d08e893500e1c5f0ad7a9ac33e 100644 (file)
@@ -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;