mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
9c23169e8c
commit
6d1bbc6273
4 changed files with 29 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue