diff options
author | Andreas Färber <afaerber@suse.de> | 2013-06-09 22:11:49 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-07-01 01:11:16 +0200 |
commit | b048960f15dbedeceb4e1d7e469080cf68d4cf67 (patch) | |
tree | ee9a82a6c268530b697035cdc3d7eecdb1a8f466 /target-ppc/cpu.h | |
parent | ab8131afee34d6aa427bd56ac18c4d3b6df80728 (diff) |
target-ppc: Introduce unrealizefn for PowerPCCPU
Use it to clean up the opcode table, resolving a former TODO from Jocelyn.
Also switch from malloc() to g_malloc().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/cpu.h')
-rw-r--r-- | target-ppc/cpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index aa1d013c31..0ede077d72 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -886,6 +886,8 @@ struct ppc_segment_page_sizes { /* The whole PowerPC CPU context */ #define NB_MMU_MODES 3 +#define PPC_CPU_OPCODES_LEN 0x40 + struct CPUPPCState { /* First are the most commonly used resources * during translated code execution @@ -1039,7 +1041,7 @@ struct CPUPPCState { /* Those resources are used only during code translation */ /* opcode handlers */ - opc_handler_t *opcodes[0x40]; + opc_handler_t *opcodes[PPC_CPU_OPCODES_LEN]; /* Those resources are used only in QEMU core */ target_ulong hflags; /* hflags is a MSR & HFLAGS_MASK */ |