aboutsummaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-cris/cpu.c b/target-cris/cpu.c
index 80089884e9..7974be33f2 100644
--- a/target-cris/cpu.c
+++ b/target-cris/cpu.c
@@ -146,11 +146,13 @@ static void cris_cpu_realizefn(DeviceState *dev, Error **errp)
static void cris_cpu_initfn(Object *obj)
{
+ CPUState *cs = CPU(obj);
CRISCPU *cpu = CRIS_CPU(obj);
CRISCPUClass *ccc = CRIS_CPU_GET_CLASS(obj);
CPUCRISState *env = &cpu->env;
static bool tcg_initialized;
+ cs->env_ptr = env;
cpu_exec_init(env);
env->pregs[PR_VR] = ccc->vr;