target-microblaze: QOM'ify CPU

Embed CPUMBState as first member of QOM MicroBlazeCPU.

Let CPUClass::reset() call cpu_state_reset() for now.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Tested-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
[AF: Updated cpu.c to include cpu-qom.h indirectly via cpu.h]
This commit is contained in:
Andreas Färber 2012-04-12 02:17:53 +02:00 committed by Edgar E. Iglesias
parent aa0d1267b3
commit b77f98cada
5 changed files with 135 additions and 1 deletions

View file

@ -1891,11 +1891,13 @@ void cpu_dump_state (CPUMBState *env, FILE *f, fprintf_function cpu_fprintf,
CPUMBState *cpu_mb_init (const char *cpu_model)
{
MicroBlazeCPU *cpu;
CPUMBState *env;
static int tcg_initialized = 0;
int i;
env = g_malloc0(sizeof(CPUMBState));
cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
env = &cpu->env;
cpu_exec_init(env);
cpu_state_reset(env);