aboutsummaryrefslogtreecommitdiff
path: root/target-lm32
diff options
context:
space:
mode:
Diffstat (limited to 'target-lm32')
-rw-r--r--target-lm32/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c
index 5f167340e4..a2badb5701 100644
--- a/target-lm32/cpu.c
+++ b/target-lm32/cpu.c
@@ -56,10 +56,12 @@ static void lm32_cpu_realizefn(DeviceState *dev, Error **errp)
static void lm32_cpu_initfn(Object *obj)
{
+ CPUState *cs = CPU(obj);
LM32CPU *cpu = LM32_CPU(obj);
CPULM32State *env = &cpu->env;
static bool tcg_initialized;
+ cs->env_ptr = env;
cpu_exec_init(env);
env->flags = 0;