diff options
Diffstat (limited to 'target-sparc/cpu.c')
-rw-r--r-- | target-sparc/cpu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index 759be532a3..ef52df6d74 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -860,9 +860,11 @@ static void sparc_cpu_realizefn(DeviceState *dev, Error **errp) static void sparc_cpu_initfn(Object *obj) { + CPUState *cs = CPU(obj); SPARCCPU *cpu = SPARC_CPU(obj); CPUSPARCState *env = &cpu->env; + cs->env_ptr = env; cpu_exec_init(env); if (tcg_enabled()) { |