aboutsummaryrefslogtreecommitdiff
path: root/target-m68k/helper.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-05 15:15:30 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:57 +0100
commit6d1bbc6273d45520c5ce6475186bfa30d8afb47c (patch)
tree94cbc3b1f80f3e9d01eff253ce922b494907c61a /target-m68k/helper.c
parent9c23169e8cd54b490d55221b6498d42966f964f3 (diff)
target-m68k: Introduce QOM realizefn for M68kCPU
Introduce realizefn and set realized = true in cpu_m68k_init(). Split off GDB registration to a new m68k_cpu_init_gdb() so that it can be called from the realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-m68k/helper.c')
-rw-r--r--target-m68k/helper.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 5ddcd707fd..3ae6fa0492 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -120,15 +120,21 @@ CPUM68KState *cpu_m68k_init(const char *cpu_model)
env->cpu_model_str = cpu_model;
register_m68k_insns(env);
+
+ object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
+
+ return env;
+}
+
+void m68k_cpu_init_gdb(M68kCPU *cpu)
+{
+ CPUM68KState *env = &cpu->env;
+
if (m68k_feature(env, M68K_FEATURE_CF_FPU)) {
gdb_register_coprocessor(env, fpu_gdb_get_reg, fpu_gdb_set_reg,
11, "cf-fp.xml", 18);
}
/* TODO: Add [E]MAC registers. */
-
- cpu_reset(ENV_GET_CPU(env));
- qemu_init_vcpu(env);
- return env;
}
void cpu_m68k_flush_flags(CPUM68KState *env, int cc_op)