aboutsummaryrefslogtreecommitdiff
path: root/target-cris/cpu.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-04-11 23:41:06 +0200
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2012-04-24 16:04:56 +0200
commitaa0d1267b3aa69c87fbd37a896bdd3f44d45c3f3 (patch)
treec457377f2b7a2221bfbd09f35ce6b2edbf4893a1 /target-cris/cpu.c
parent1c3b52fb1a44b407b52f4852c1931c571e77d308 (diff)
target-cris: Start QOM'ifying CPU init
Move VR-independent code from cpu_cris_init() into an initfn. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-cris/cpu.c')
-rw-r--r--target-cris/cpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-cris/cpu.c b/target-cris/cpu.c
index 93c7e005f8..c596609bd4 100644
--- a/target-cris/cpu.c
+++ b/target-cris/cpu.c
@@ -55,6 +55,14 @@ static void cris_cpu_reset(CPUState *s)
#endif
}
+static void cris_cpu_initfn(Object *obj)
+{
+ CRISCPU *cpu = CRIS_CPU(obj);
+ CPUCRISState *env = &cpu->env;
+
+ cpu_exec_init(env);
+}
+
static void cris_cpu_class_init(ObjectClass *oc, void *data)
{
CPUClass *cc = CPU_CLASS(oc);
@@ -68,6 +76,7 @@ static const TypeInfo cris_cpu_type_info = {
.name = TYPE_CRIS_CPU,
.parent = TYPE_CPU,
.instance_size = sizeof(CRISCPU),
+ .instance_init = cris_cpu_initfn,
.abstract = false,
.class_size = sizeof(CRISCPUClass),
.class_init = cris_cpu_class_init,