mirror of https://gitee.com/openkylin/qemu.git
Always make PowerPC hypervisor mode memory accesses and instructions
available for full system emulation, then removing all #if TARGET_PPC64H from micro-ops and code translator. Add new macros to dramatically simplify memory access tables definitions in target-ppc/translate.c. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3654 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
2f6196984b
commit
7863667f35
|
@ -305,10 +305,8 @@ struct ppc_spr_t {
|
||||||
#if !defined(CONFIG_USER_ONLY)
|
#if !defined(CONFIG_USER_ONLY)
|
||||||
void (*oea_read)(void *opaque, int spr_num);
|
void (*oea_read)(void *opaque, int spr_num);
|
||||||
void (*oea_write)(void *opaque, int spr_num);
|
void (*oea_write)(void *opaque, int spr_num);
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
void (*hea_read)(void *opaque, int spr_num);
|
void (*hea_read)(void *opaque, int spr_num);
|
||||||
void (*hea_write)(void *opaque, int spr_num);
|
void (*hea_write)(void *opaque, int spr_num);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
const unsigned char *name;
|
const unsigned char *name;
|
||||||
};
|
};
|
||||||
|
@ -510,11 +508,7 @@ enum {
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* The whole PowerPC CPU context */
|
/* The whole PowerPC CPU context */
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
#define NB_MMU_MODES 3
|
#define NB_MMU_MODES 3
|
||||||
#else
|
|
||||||
#define NB_MMU_MODES 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct CPUPPCState {
|
struct CPUPPCState {
|
||||||
/* First are the most commonly used resources
|
/* First are the most commonly used resources
|
||||||
|
@ -783,9 +777,7 @@ int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, target_ulong val);
|
||||||
/* MMU modes definitions */
|
/* MMU modes definitions */
|
||||||
#define MMU_MODE0_SUFFIX _user
|
#define MMU_MODE0_SUFFIX _user
|
||||||
#define MMU_MODE1_SUFFIX _kernel
|
#define MMU_MODE1_SUFFIX _kernel
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
#define MMU_MODE2_SUFFIX _hypv
|
#define MMU_MODE2_SUFFIX _hypv
|
||||||
#endif
|
|
||||||
#define MMU_USER_IDX 0
|
#define MMU_USER_IDX 0
|
||||||
static inline int cpu_mmu_index (CPUState *env)
|
static inline int cpu_mmu_index (CPUState *env)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1987,12 +1987,10 @@ void OPPROTO op_fneg (void)
|
||||||
#define MEMSUFFIX _kernel
|
#define MEMSUFFIX _kernel
|
||||||
#include "op_helper.h"
|
#include "op_helper.h"
|
||||||
#include "op_mem.h"
|
#include "op_mem.h"
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
#define MEMSUFFIX _hypv
|
#define MEMSUFFIX _hypv
|
||||||
#include "op_helper.h"
|
#include "op_helper.h"
|
||||||
#include "op_mem.h"
|
#include "op_mem.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Special op to check and maybe clear reservation */
|
/* Special op to check and maybe clear reservation */
|
||||||
void OPPROTO op_check_reservation (void)
|
void OPPROTO op_check_reservation (void)
|
||||||
|
@ -2031,9 +2029,7 @@ void OPPROTO op_rfid (void)
|
||||||
do_rfid();
|
do_rfid();
|
||||||
RETURN();
|
RETURN();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
void OPPROTO op_hrfid (void)
|
void OPPROTO op_hrfid (void)
|
||||||
{
|
{
|
||||||
do_hrfid();
|
do_hrfid();
|
||||||
|
|
|
@ -33,12 +33,10 @@
|
||||||
#define MEMSUFFIX _kernel
|
#define MEMSUFFIX _kernel
|
||||||
#include "op_helper.h"
|
#include "op_helper.h"
|
||||||
#include "op_helper_mem.h"
|
#include "op_helper_mem.h"
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
#define MEMSUFFIX _hypv
|
#define MEMSUFFIX _hypv
|
||||||
#include "op_helper.h"
|
#include "op_helper.h"
|
||||||
#include "op_helper_mem.h"
|
#include "op_helper_mem.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
//#define DEBUG_OP
|
//#define DEBUG_OP
|
||||||
//#define DEBUG_EXCEPTIONS
|
//#define DEBUG_EXCEPTIONS
|
||||||
|
@ -1475,8 +1473,7 @@ void do_rfid (void)
|
||||||
__do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
|
__do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
|
||||||
~((target_ulong)0xFFFF0000), 0);
|
~((target_ulong)0xFFFF0000), 0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
void do_hrfid (void)
|
void do_hrfid (void)
|
||||||
{
|
{
|
||||||
__do_rfi(env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
|
__do_rfi(env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
|
||||||
|
|
|
@ -146,8 +146,6 @@ void do_store_msr (void);
|
||||||
void do_rfi (void);
|
void do_rfi (void);
|
||||||
#if defined(TARGET_PPC64)
|
#if defined(TARGET_PPC64)
|
||||||
void do_rfid (void);
|
void do_rfid (void);
|
||||||
#endif
|
|
||||||
#if defined(TARGET_PPC64H)
|
|
||||||
void do_hrfid (void);
|
void do_hrfid (void);
|
||||||
#endif
|
#endif
|
||||||
void do_load_6xx_tlb (int is_code);
|
void do_load_6xx_tlb (int is_code);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -264,7 +264,8 @@ int cpu_restore_state(TranslationBlock *tb,
|
||||||
#else
|
#else
|
||||||
#define CASE3(op)\
|
#define CASE3(op)\
|
||||||
case INDEX_op_ ## op ## _user:\
|
case INDEX_op_ ## op ## _user:\
|
||||||
case INDEX_op_ ## op ## _kernel
|
case INDEX_op_ ## op ## _kernel:\
|
||||||
|
case INDEX_op_ ## op ## _hypv
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CASE3(stfd):
|
CASE3(stfd):
|
||||||
|
|
Loading…
Reference in New Issue