mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/m68k: Check for USER_ONLY definition instead of SOFTMMU one
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230613133347.82210-4-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
66352d7ef2
commit
6a14058677
4 changed files with 23 additions and 25 deletions
|
@ -80,10 +80,10 @@ static void m68k_cpu_reset_hold(Object *obj)
|
|||
}
|
||||
|
||||
memset(env, 0, offsetof(CPUM68KState, end_reset_fields));
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
cpu_m68k_set_sr(env, SR_S | SR_I);
|
||||
#else
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
cpu_m68k_set_sr(env, 0);
|
||||
#else
|
||||
cpu_m68k_set_sr(env, SR_S | SR_I);
|
||||
#endif
|
||||
for (i = 0; i < 8; i++) {
|
||||
env->fregs[i].d = nan;
|
||||
|
@ -334,7 +334,7 @@ static void m68k_cpu_initfn(Object *obj)
|
|||
cpu_set_cpustate_pointers(cpu);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SOFTMMU)
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
static bool fpu_needed(void *opaque)
|
||||
{
|
||||
M68kCPU *s = opaque;
|
||||
|
@ -525,15 +525,13 @@ static const VMStateDescription vmstate_m68k_cpu = {
|
|||
NULL
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#include "hw/core/sysemu-cpu-ops.h"
|
||||
|
||||
static const struct SysemuCPUOps m68k_sysemu_ops = {
|
||||
.get_phys_page_debug = m68k_cpu_get_phys_page_debug,
|
||||
};
|
||||
#endif
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
#include "hw/core/tcg-cpu-ops.h"
|
||||
|
||||
|
@ -568,7 +566,7 @@ static void m68k_cpu_class_init(ObjectClass *c, void *data)
|
|||
cc->get_pc = m68k_cpu_get_pc;
|
||||
cc->gdb_read_register = m68k_cpu_gdb_read_register;
|
||||
cc->gdb_write_register = m68k_cpu_gdb_write_register;
|
||||
#if defined(CONFIG_SOFTMMU)
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
dc->vmsd = &vmstate_m68k_cpu;
|
||||
cc->sysemu_ops = &m68k_sysemu_ops;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue