mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target/alpha: Split out alpha_env_mmu_index
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
343ed32dac
commit
32a8ea12fa
2 changed files with 7 additions and 2 deletions
|
@ -389,7 +389,7 @@ enum {
|
||||||
|
|
||||||
#define TB_FLAG_UNALIGN (1u << 1)
|
#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;
|
int ret = env->flags & ENV_FLAG_PS_USER ? MMU_USER_IDX : MMU_KERNEL_IDX;
|
||||||
if (env->flags & ENV_FLAG_PAL_MODE) {
|
if (env->flags & ENV_FLAG_PAL_MODE) {
|
||||||
|
@ -398,6 +398,11 @@ static inline int cpu_mmu_index(CPUAlphaState *env, bool ifetch)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int cpu_mmu_index(CPUAlphaState *env, bool ifetch)
|
||||||
|
{
|
||||||
|
return alpha_env_mmu_index(env);
|
||||||
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
IR_V0 = 0,
|
IR_V0 = 0,
|
||||||
IR_T0 = 1,
|
IR_T0 = 1,
|
||||||
|
|
|
@ -2875,7 +2875,7 @@ static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu)
|
||||||
int64_t bound;
|
int64_t bound;
|
||||||
|
|
||||||
ctx->tbflags = ctx->base.tb->flags;
|
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->implver = env->implver;
|
||||||
ctx->amask = env->amask;
|
ctx->amask = env->amask;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue