target-alpha: Use kernel mmu_idx for pal_mode.

Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Richard Henderson 2011-05-20 14:14:44 -07:00 committed by Richard Henderson
parent ea879fc719
commit bba9bdcee8
2 changed files with 9 additions and 5 deletions

View File

@ -341,7 +341,13 @@ enum {
static inline int cpu_mmu_index(CPUState *env) static inline int cpu_mmu_index(CPUState *env)
{ {
return (env->ps & PS_USER_MODE) != 0; if (env->pal_mode) {
return MMU_KERNEL_IDX;
} else if (env->ps & PS_USER_MODE) {
return MMU_USER_IDX;
} else {
return MMU_KERNEL_IDX;
}
} }
enum { enum {

View File

@ -3098,10 +3098,8 @@ static inline void gen_intermediate_code_internal(CPUState *env,
ctx.env = env; ctx.env = env;
ctx.pc = pc_start; ctx.pc = pc_start;
ctx.amask = env->amask; ctx.amask = env->amask;
#if defined (CONFIG_USER_ONLY) ctx.mem_idx = cpu_mmu_index(env);
ctx.mem_idx = 0; #if !defined (CONFIG_USER_ONLY)
#else
ctx.mem_idx = ((env->ps >> 3) & 3);
ctx.pal_mode = env->pal_mode; ctx.pal_mode = env->pal_mode;
#endif #endif