Commit 7820dbf3f0d8ebc44b8dfc0853c8a2c4bd6aea8e
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
Showing
2 changed files
with
12 additions
and
11 deletions
target-ppc/cpu.h
| ... | ... | @@ -89,7 +89,8 @@ typedef uint32_t ppc_gpr_t; |
| 89 | 89 | |
| 90 | 90 | /*****************************************************************************/ |
| 91 | 91 | /* MMU model */ |
| 92 | -enum { | |
| 92 | +typedef enum powerpc_mmu_t powerpc_mmu_t; | |
| 93 | +enum powerpc_mmu_t { | |
| 93 | 94 | POWERPC_MMU_UNKNOWN = 0, |
| 94 | 95 | /* Standard 32 bits PowerPC MMU */ |
| 95 | 96 | POWERPC_MMU_32B, |
| ... | ... | @@ -117,7 +118,8 @@ enum { |
| 117 | 118 | |
| 118 | 119 | /*****************************************************************************/ |
| 119 | 120 | /* Exception model */ |
| 120 | -enum { | |
| 121 | +typedef enum powerpc_excp_t powerpc_excp_t; | |
| 122 | +enum powerpc_excp_t { | |
| 121 | 123 | POWERPC_EXCP_UNKNOWN = 0, |
| 122 | 124 | /* Standard PowerPC exception model */ |
| 123 | 125 | POWERPC_EXCP_STD, |
| ... | ... | @@ -263,7 +265,8 @@ enum { |
| 263 | 265 | |
| 264 | 266 | /*****************************************************************************/ |
| 265 | 267 | /* Input pins model */ |
| 266 | -enum { | |
| 268 | +typedef enum powerpc_input_t powerpc_input_t; | |
| 269 | +enum powerpc_input_t { | |
| 267 | 270 | PPC_FLAGS_INPUT_UNKNOWN = 0, |
| 268 | 271 | /* PowerPC 6xx bus */ |
| 269 | 272 | PPC_FLAGS_INPUT_6xx, |
| ... | ... | @@ -609,10 +612,9 @@ struct CPUPPCState { |
| 609 | 612 | /* Those resources are used during exception processing */ |
| 610 | 613 | /* CPU model definition */ |
| 611 | 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 | 618 | int bfd_mach; |
| 617 | 619 | uint32_t flags; |
| 618 | 620 | ... | ... |
target-ppc/translate_init.c
| ... | ... | @@ -35,10 +35,9 @@ struct ppc_def_t { |
| 35 | 35 | uint32_t pvr; |
| 36 | 36 | uint64_t insns_flags; |
| 37 | 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 | 41 | uint32_t flags; |
| 43 | 42 | int bfd_mach; |
| 44 | 43 | void (*init_proc)(CPUPPCState *env); | ... | ... |