aboutsummaryrefslogtreecommitdiff
path: root/target-xtensa/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-xtensa/cpu.c')
-rw-r--r--target-xtensa/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-xtensa/cpu.c b/target-xtensa/cpu.c
index 309bb16..785e56d 100644
--- a/target-xtensa/cpu.c
+++ b/target-xtensa/cpu.c
@@ -69,10 +69,12 @@ static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp)
static void xtensa_cpu_initfn(Object *obj)
{
+ CPUState *cs = CPU(obj);
XtensaCPU *cpu = XTENSA_CPU(obj);
CPUXtensaState *env = &cpu->env;
static bool tcg_inited;
+ cs->env_ptr = env;
cpu_exec_init(env);
if (tcg_enabled() && !tcg_inited) {