Revision 6ebbf390 target-ppc/cpu.h

b/target-ppc/cpu.h
434 434
    POWERPC_FLAG_PMM  = 0x00000400,
435 435
};
436 436

  
437
#if defined(TARGET_PPC64H)
438
#define NB_MMU_MODES 3
439
#else
440
#define NB_MMU_MODES 2
441
#endif
442

  
437 443
/*****************************************************************************/
438 444
/* The whole PowerPC CPU context */
439 445
struct CPUPPCState {
......
575 581
    jmp_buf jmp_env;
576 582
    int user_mode_only; /* user mode only simulation */
577 583
    target_ulong hflags; /* hflags is a MSR & HFLAGS_MASK */
584
    int mmu_idx;         /* precomputed MMU index to speed up mem accesses */
578 585

  
579 586
    /* Power management */
580 587
    int power_mode;
......
699 706
#define cpu_signal_handler cpu_ppc_signal_handler
700 707
#define cpu_list ppc_cpu_list
701 708

  
709
/* MMU modes definitions */
710
#define MMU_MODE0_SUFFIX _user
711
#define MMU_MODE1_SUFFIX _kernel
712
#if defined(TARGET_PPC64H)
713
#define MMU_MODE2_SUFFIX _hypv
714
#endif
715
#define MMU_USER_IDX 0
716
static inline int cpu_mmu_index (CPUState *env)
717
{
718
    return env->mmu_idx;
719
}
720

  
702 721
#include "cpu-all.h"
703 722

  
704 723
/*****************************************************************************/

Also available in: Unified diff