aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/translate_init.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-07 14:41:00 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-07 14:41:00 +0000
commitd26bfc9a1b449db84b80d39ed9d870671a944e5c (patch)
treead28e376a60ef40c6bbca8c6dc19e69f3e7bf1b1 /target-ppc/translate_init.c
parent7875ed20d7d39496c5e5e6bd85ced79e019bbe65 (diff)
downloadqemu-d26bfc9a1b449db84b80d39ed9d870671a944e5c.zip
qemu-d26bfc9a1b449db84b80d39ed9d870671a944e5c.tar.gz
qemu-d26bfc9a1b449db84b80d39ed9d870671a944e5c.tar.bz2
Add MSR bits signification per PowerPC implementation flags (to be continued).
As a side effect, single step and branch step are available again. Remove irrelevant MSR bits definitions. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3342 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate_init.c')
-rw-r--r--target-ppc/translate_init.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 8bc6209..296727e 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -39,6 +39,7 @@ struct ppc_def_t {
uint8_t excp_model;
uint8_t bus_model;
uint8_t pad;
+ uint32_t flags;
int bfd_mach;
void (*init_proc)(CPUPPCState *env);
};
@@ -2581,6 +2582,7 @@ static void init_excp_970 (CPUPPCState *env)
#define POWERPC_EXCP_401 (POWERPC_EXCP_40x)
#define POWERPC_INPUT_401 (PPC_FLAGS_INPUT_401)
#define POWERPC_BFDM_401 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_401 (POWERPC_FLAG_NONE)
static void init_proc_401 (CPUPPCState *env)
{
@@ -2605,6 +2607,7 @@ static void init_proc_401 (CPUPPCState *env)
#define POWERPC_EXCP_401x2 (POWERPC_EXCP_40x)
#define POWERPC_INPUT_401x2 (PPC_FLAGS_INPUT_401)
#define POWERPC_BFDM_401x2 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_401x2 (POWERPC_FLAG_NONE)
static void init_proc_401x2 (CPUPPCState *env)
{
@@ -2634,6 +2637,7 @@ static void init_proc_401x2 (CPUPPCState *env)
#define POWERPC_EXCP_401x3 (POWERPC_EXCP_40x)
#define POWERPC_INPUT_401x3 (PPC_FLAGS_INPUT_401)
#define POWERPC_BFDM_401x3 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_401x3 (POWERPC_FLAG_NONE)
__attribute__ (( unused ))
static void init_proc_401x3 (CPUPPCState *env)
@@ -2661,6 +2665,7 @@ static void init_proc_401x3 (CPUPPCState *env)
#define POWERPC_EXCP_IOP480 (POWERPC_EXCP_40x)
#define POWERPC_INPUT_IOP480 (PPC_FLAGS_INPUT_401)
#define POWERPC_BFDM_IOP480 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_IOP480 (POWERPC_FLAG_NONE)
static void init_proc_IOP480 (CPUPPCState *env)
{
@@ -2689,6 +2694,7 @@ static void init_proc_IOP480 (CPUPPCState *env)
#define POWERPC_EXCP_403 (POWERPC_EXCP_40x)
#define POWERPC_INPUT_403 (PPC_FLAGS_INPUT_401)
#define POWERPC_BFDM_403 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_403 (POWERPC_FLAG_NONE)
static void init_proc_403 (CPUPPCState *env)
{
@@ -2717,6 +2723,7 @@ static void init_proc_403 (CPUPPCState *env)
#define POWERPC_EXCP_403GCX (POWERPC_EXCP_40x)
#define POWERPC_INPUT_403GCX (PPC_FLAGS_INPUT_401)
#define POWERPC_BFDM_403GCX (bfd_mach_ppc_403)
+#define POWERPC_FLAG_403GCX (POWERPC_FLAG_NONE)
static void init_proc_403GCX (CPUPPCState *env)
{
@@ -2758,6 +2765,7 @@ static void init_proc_403GCX (CPUPPCState *env)
#define POWERPC_EXCP_405 (POWERPC_EXCP_40x)
#define POWERPC_INPUT_405 (PPC_FLAGS_INPUT_405)
#define POWERPC_BFDM_405 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_405 (POWERPC_FLAG_NONE)
static void init_proc_405 (CPUPPCState *env)
{
@@ -2797,6 +2805,7 @@ static void init_proc_405 (CPUPPCState *env)
#define POWERPC_EXCP_440EP (POWERPC_EXCP_BOOKE)
#define POWERPC_INPUT_440EP (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_440EP (bfd_mach_ppc_403)
+#define POWERPC_FLAG_440EP (POWERPC_FLAG_NONE)
static void init_proc_440EP (CPUPPCState *env)
{
@@ -2842,6 +2851,7 @@ static void init_proc_440EP (CPUPPCState *env)
#define POWERPC_EXCP_440GP (POWERPC_EXCP_BOOKE)
#define POWERPC_INPUT_440GP (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_440GP (bfd_mach_ppc_403)
+#define POWERPC_FLAG_440GP (POWERPC_FLAG_NONE)
static void init_proc_440GP (CPUPPCState *env)
{
@@ -2869,6 +2879,7 @@ static void init_proc_440GP (CPUPPCState *env)
#define POWERPC_EXCP_440x4 (POWERPC_EXCP_BOOKE)
#define POWERPC_INPUT_440x4 (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_440x4 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_440x4 (POWERPC_FLAG_NONE)
__attribute__ (( unused ))
static void init_proc_440x4 (CPUPPCState *env)
@@ -2897,6 +2908,7 @@ static void init_proc_440x4 (CPUPPCState *env)
#define POWERPC_EXCP_440x5 (POWERPC_EXCP_BOOKE)
#define POWERPC_INPUT_440x5 (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_440x5 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_440x5 (POWERPC_FLAG_NONE)
static void init_proc_440x5 (CPUPPCState *env)
{
@@ -2942,6 +2954,7 @@ static void init_proc_440x5 (CPUPPCState *env)
#define POWERPC_EXCP_460 (POWERPC_EXCP_BOOKE)
#define POWERPC_INPUT_460 (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_460 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_460 (POWERPC_FLAG_NONE)
__attribute__ (( unused ))
static void init_proc_460 (CPUPPCState *env)
@@ -2996,6 +3009,7 @@ static void init_proc_460 (CPUPPCState *env)
#define POWERPC_EXCP_460F (POWERPC_EXCP_BOOKE)
#define POWERPC_INPUT_460F (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_460F (bfd_mach_ppc_403)
+#define POWERPC_FLAG_460F (POWERPC_FLAG_NONE)
__attribute__ (( unused ))
static void init_proc_460F (CPUPPCState *env)
@@ -3050,6 +3064,7 @@ static void init_proc_460F (CPUPPCState *env)
#define POWERPC_EXCP_BookE (POWERPC_EXCP_BOOKE)
#define POWERPC_INPUT_BookE (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_BookE (bfd_mach_ppc_403)
+#define POWERPC_FLAG_BookE (POWERPC_FLAG_NONE)
__attribute__ (( unused ))
static void init_proc_BookE (CPUPPCState *env)
@@ -3072,6 +3087,7 @@ static void init_proc_BookE (CPUPPCState *env)
#define POWERPC_EXCP_e500 (POWERPC_EXCP_40x)
#define POWERPC_INPUT_e500 (PPC_FLAGS_INPUT_BookE)
#define POWERPC_BFDM_e500 (bfd_mach_ppc_403)
+#define POWERPC_FLAG_e500 (POWERPC_FLAG_SPE)
__attribute__ (( unused ))
static void init_proc_e500 (CPUPPCState *env)
@@ -3118,6 +3134,7 @@ static void init_proc_e500 (CPUPPCState *env)
//#define POWERPC_EXCP_601 (POWERPC_EXCP_601)
#define POWERPC_INPUT_601 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_601 (bfd_mach_ppc_601)
+#define POWERPC_FLAG_601 (POWERPC_FLAG_NONE)
static void init_proc_601 (CPUPPCState *env)
{
@@ -3171,6 +3188,7 @@ static void init_proc_601 (CPUPPCState *env)
//#define POWERPC_EXCP_602 (POWERPC_EXCP_602)
#define POWERPC_INPUT_602 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_602 (bfd_mach_ppc_602)
+#define POWERPC_FLAG_602 (POWERPC_FLAG_TGPR)
static void init_proc_602 (CPUPPCState *env)
{
@@ -3206,6 +3224,7 @@ static void init_proc_602 (CPUPPCState *env)
//#define POWERPC_EXCP_603 (POWERPC_EXCP_603)
#define POWERPC_INPUT_603 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_603 (bfd_mach_ppc_603)
+#define POWERPC_FLAG_603 (POWERPC_FLAG_TGPR)
static void init_proc_603 (CPUPPCState *env)
{
@@ -3241,6 +3260,7 @@ static void init_proc_603 (CPUPPCState *env)
//#define POWERPC_EXCP_603E (POWERPC_EXCP_603E)
#define POWERPC_INPUT_603E (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_603E (bfd_mach_ppc_ec603e)
+#define POWERPC_FLAG_603E (POWERPC_FLAG_TGPR)
static void init_proc_603E (CPUPPCState *env)
{
@@ -3281,6 +3301,7 @@ static void init_proc_603E (CPUPPCState *env)
//#define POWERPC_EXCP_G2 (POWERPC_EXCP_G2)
#define POWERPC_INPUT_G2 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_G2 (bfd_mach_ppc_ec603e)
+#define POWERPC_FLAG_G2 (POWERPC_FLAG_TGPR)
static void init_proc_G2 (CPUPPCState *env)
{
@@ -3323,6 +3344,7 @@ static void init_proc_G2 (CPUPPCState *env)
#define POWERPC_EXCP_G2LE (POWERPC_EXCP_G2)
#define POWERPC_INPUT_G2LE (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_G2LE (bfd_mach_ppc_ec603e)
+#define POWERPC_FLAG_G2LE (POWERPC_FLAG_TGPR)
static void init_proc_G2LE (CPUPPCState *env)
{
@@ -3365,6 +3387,7 @@ static void init_proc_G2LE (CPUPPCState *env)
//#define POWERPC_EXCP_604 (POWERPC_EXCP_604)
#define POWERPC_INPUT_604 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_604 (bfd_mach_ppc_604)
+#define POWERPC_FLAG_604 (POWERPC_FLAG_NONE)
static void init_proc_604 (CPUPPCState *env)
{
@@ -3399,6 +3422,7 @@ static void init_proc_604 (CPUPPCState *env)
//#define POWERPC_EXCP_7x0 (POWERPC_EXCP_7x0)
#define POWERPC_INPUT_7x0 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7x0 (bfd_mach_ppc_750)
+#define POWERPC_FLAG_7x0 (POWERPC_FLAG_NONE)
static void init_proc_7x0 (CPUPPCState *env)
{
@@ -3435,6 +3459,7 @@ static void init_proc_7x0 (CPUPPCState *env)
#define POWERPC_EXCP_750fx (POWERPC_EXCP_7x0)
#define POWERPC_INPUT_750fx (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_750fx (bfd_mach_ppc_750)
+#define POWERPC_FLAG_750fx (POWERPC_FLAG_NONE)
static void init_proc_750fx (CPUPPCState *env)
{
@@ -3478,6 +3503,7 @@ static void init_proc_750fx (CPUPPCState *env)
//#define POWERPC_EXCP_7x5 (POWERPC_EXCP_7x5)
#define POWERPC_INPUT_7x5 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7x5 (bfd_mach_ppc_750)
+#define POWERPC_FLAG_7x5 (POWERPC_FLAG_NONE)
static void init_proc_7x5 (CPUPPCState *env)
{
@@ -3536,6 +3562,7 @@ static void init_proc_7x5 (CPUPPCState *env)
#define POWERPC_EXCP_7400 (POWERPC_EXCP_74xx)
#define POWERPC_INPUT_7400 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7400 (bfd_mach_ppc_7400)
+#define POWERPC_FLAG_7400 (POWERPC_FLAG_VRE)
static void init_proc_7400 (CPUPPCState *env)
{
@@ -3565,6 +3592,7 @@ static void init_proc_7400 (CPUPPCState *env)
#define POWERPC_EXCP_7410 (POWERPC_EXCP_74xx)
#define POWERPC_INPUT_7410 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7410 (bfd_mach_ppc_7400)
+#define POWERPC_FLAG_7410 (POWERPC_FLAG_VRE)
static void init_proc_7410 (CPUPPCState *env)
{
@@ -3606,6 +3634,7 @@ static void init_proc_7410 (CPUPPCState *env)
#define POWERPC_EXCP_7440 (POWERPC_EXCP_74xx)
#define POWERPC_INPUT_7440 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7440 (bfd_mach_ppc_7400)
+#define POWERPC_FLAG_7440 (POWERPC_FLAG_VRE)
__attribute__ (( unused ))
static void init_proc_7440 (CPUPPCState *env)
@@ -3674,6 +3703,7 @@ static void init_proc_7440 (CPUPPCState *env)
#define POWERPC_EXCP_7450 (POWERPC_EXCP_74xx)
#define POWERPC_INPUT_7450 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7450 (bfd_mach_ppc_7400)
+#define POWERPC_FLAG_7450 (POWERPC_FLAG_VRE)
__attribute__ (( unused ))
static void init_proc_7450 (CPUPPCState *env)
@@ -3744,6 +3774,7 @@ static void init_proc_7450 (CPUPPCState *env)
#define POWERPC_EXCP_7445 (POWERPC_EXCP_74xx)
#define POWERPC_INPUT_7445 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7445 (bfd_mach_ppc_7400)
+#define POWERPC_FLAG_7445 (POWERPC_FLAG_VRE)
__attribute__ (( unused ))
static void init_proc_7445 (CPUPPCState *env)
@@ -3846,6 +3877,7 @@ static void init_proc_7445 (CPUPPCState *env)
#define POWERPC_EXCP_7455 (POWERPC_EXCP_74xx)
#define POWERPC_INPUT_7455 (PPC_FLAGS_INPUT_6xx)
#define POWERPC_BFDM_7455 (bfd_mach_ppc_7400)
+#define POWERPC_FLAG_7455 (POWERPC_FLAG_VRE)
__attribute__ (( unused ))
static void init_proc_7455 (CPUPPCState *env)
@@ -3955,6 +3987,7 @@ static void init_proc_7455 (CPUPPCState *env)
//#define POWERPC_EXCP_970 (POWERPC_EXCP_970)
#define POWERPC_INPUT_970 (PPC_FLAGS_INPUT_970)
#define POWERPC_BFDM_970 (bfd_mach_ppc64)
+#define POWERPC_FLAG_970 (POWERPC_FLAG_VRE)
static void init_proc_970 (CPUPPCState *env)
{
@@ -4025,6 +4058,7 @@ static void init_proc_970 (CPUPPCState *env)
#define POWERPC_EXCP_970FX (POWERPC_EXCP_970)
#define POWERPC_INPUT_970FX (PPC_FLAGS_INPUT_970)
#define POWERPC_BFDM_970FX (bfd_mach_ppc64)
+#define POWERPC_FLAG_970FX (POWERPC_FLAG_VRE)
static void init_proc_970FX (CPUPPCState *env)
{
@@ -4095,6 +4129,7 @@ static void init_proc_970FX (CPUPPCState *env)
#define POWERPC_EXCP_970GX (POWERPC_EXCP_970)
#define POWERPC_INPUT_970GX (PPC_FLAGS_INPUT_970)
#define POWERPC_BFDM_970GX (bfd_mach_ppc64)
+#define POWERPC_FLAG_970GX (POWERPC_FLAG_VRE)
static void init_proc_970GX (CPUPPCState *env)
{
@@ -4164,6 +4199,7 @@ static void init_proc_970GX (CPUPPCState *env)
#define POWERPC_EXCP_620 (POWERPC_EXCP_970)
#define POWERPC_INPUT_620 (PPC_FLAGS_INPUT_970)
#define POWERPC_BFDM_620 (bfd_mach_ppc64)
+#define POWERPC_FLAG_620 (POWERPC_FLAG_NONE)
__attribute__ (( unused ))
static void init_proc_620 (CPUPPCState *env)
@@ -4197,6 +4233,7 @@ static void init_proc_620 (CPUPPCState *env)
#define POWERPC_INPUT_PPC32 POWERPC_INPUT_604
#define init_proc_PPC32 init_proc_604
#define POWERPC_BFDM_PPC32 POWERPC_BFDM_604
+#define POWERPC_FLAG_PPC32 POWERPC_FLAG_604
/* Default 64 bits PowerPC target will be 970 FX */
#define CPU_POWERPC_PPC64 CPU_POWERPC_970FX
@@ -4207,6 +4244,7 @@ static void init_proc_620 (CPUPPCState *env)
#define POWERPC_INPUT_PPC64 POWERPC_INPUT_970FX
#define init_proc_PPC64 init_proc_970FX
#define POWERPC_BFDM_PPC64 POWERPC_BFDM_970FX
+#define POWERPC_FLAG_PPC64 POWERPC_FLAG_970FX
/* Default PowerPC target will be PowerPC 32 */
#if defined (TARGET_PPC64) && 0 // XXX: TODO
@@ -4218,6 +4256,7 @@ static void init_proc_620 (CPUPPCState *env)
#define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC64
#define init_proc_DEFAULT init_proc_PPC64
#define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC64
+#define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC64
#else
#define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC32
#define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC32
@@ -4227,6 +4266,7 @@ static void init_proc_620 (CPUPPCState *env)
#define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC32
#define init_proc_DEFAULT init_proc_PPC32
#define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC32
+#define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC32
#endif
/*****************************************************************************/
@@ -4724,6 +4764,7 @@ enum {
.excp_model = glue(POWERPC_EXCP_,_type), \
.bus_model = glue(POWERPC_INPUT_,_type), \
.bfd_mach = glue(POWERPC_BFDM_,_type), \
+ .flags = glue(POWERPC_FLAG_,_type), \
.init_proc = &glue(init_proc_,_type), \
}
@@ -6016,6 +6057,7 @@ int cpu_ppc_register (CPUPPCState *env, ppc_def_t *def)
env->mmu_model = def->mmu_model;
env->excp_model = def->excp_model;
env->bus_model = def->bus_model;
+ env->flags = def->flags;
env->bfd_mach = def->bfd_mach;
if (create_ppc_opcodes(env, def) < 0)
return -1;