Commit 7820dbf3f0d8ebc44b8dfc0853c8a2c4bd6aea8e

Authored by j_mayer
1 parent 7b62a955

Make the PowerPC MMU model, exception model and input bus model

typedefed enums.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3660 c046a42c-6fe2-441c-8c8c-71466251a162
target-ppc/cpu.h
@@ -89,7 +89,8 @@ typedef uint32_t ppc_gpr_t; @@ -89,7 +89,8 @@ typedef uint32_t ppc_gpr_t;
89 89
90 /*****************************************************************************/ 90 /*****************************************************************************/
91 /* MMU model */ 91 /* MMU model */
92 -enum { 92 +typedef enum powerpc_mmu_t powerpc_mmu_t;
  93 +enum powerpc_mmu_t {
93 POWERPC_MMU_UNKNOWN = 0, 94 POWERPC_MMU_UNKNOWN = 0,
94 /* Standard 32 bits PowerPC MMU */ 95 /* Standard 32 bits PowerPC MMU */
95 POWERPC_MMU_32B, 96 POWERPC_MMU_32B,
@@ -117,7 +118,8 @@ enum { @@ -117,7 +118,8 @@ enum {
117 118
118 /*****************************************************************************/ 119 /*****************************************************************************/
119 /* Exception model */ 120 /* Exception model */
120 -enum { 121 +typedef enum powerpc_excp_t powerpc_excp_t;
  122 +enum powerpc_excp_t {
121 POWERPC_EXCP_UNKNOWN = 0, 123 POWERPC_EXCP_UNKNOWN = 0,
122 /* Standard PowerPC exception model */ 124 /* Standard PowerPC exception model */
123 POWERPC_EXCP_STD, 125 POWERPC_EXCP_STD,
@@ -263,7 +265,8 @@ enum { @@ -263,7 +265,8 @@ enum {
263 265
264 /*****************************************************************************/ 266 /*****************************************************************************/
265 /* Input pins model */ 267 /* Input pins model */
266 -enum { 268 +typedef enum powerpc_input_t powerpc_input_t;
  269 +enum powerpc_input_t {
267 PPC_FLAGS_INPUT_UNKNOWN = 0, 270 PPC_FLAGS_INPUT_UNKNOWN = 0,
268 /* PowerPC 6xx bus */ 271 /* PowerPC 6xx bus */
269 PPC_FLAGS_INPUT_6xx, 272 PPC_FLAGS_INPUT_6xx,
@@ -609,10 +612,9 @@ struct CPUPPCState { @@ -609,10 +612,9 @@ struct CPUPPCState {
609 /* Those resources are used during exception processing */ 612 /* Those resources are used during exception processing */
610 /* CPU model definition */ 613 /* CPU model definition */
611 target_ulong msr_mask; 614 target_ulong msr_mask;
612 - uint8_t mmu_model;  
613 - uint8_t excp_model;  
614 - uint8_t bus_model;  
615 - uint8_t pad; 615 + powerpc_mmu_t mmu_model;
  616 + powerpc_excp_t excp_model;
  617 + powerpc_input_t bus_model;
616 int bfd_mach; 618 int bfd_mach;
617 uint32_t flags; 619 uint32_t flags;
618 620
target-ppc/translate_init.c
@@ -35,10 +35,9 @@ struct ppc_def_t { @@ -35,10 +35,9 @@ struct ppc_def_t {
35 uint32_t pvr; 35 uint32_t pvr;
36 uint64_t insns_flags; 36 uint64_t insns_flags;
37 uint64_t msr_mask; 37 uint64_t msr_mask;
38 - uint8_t mmu_model;  
39 - uint8_t excp_model;  
40 - uint8_t bus_model;  
41 - uint8_t pad; 38 + powerpc_mmu_t mmu_model;
  39 + powerpc_excp_t excp_model;
  40 + powerpc_input_t bus_model;
42 uint32_t flags; 41 uint32_t flags;
43 int bfd_mach; 42 int bfd_mach;
44 void (*init_proc)(CPUPPCState *env); 43 void (*init_proc)(CPUPPCState *env);