aboutsummaryrefslogtreecommitdiff
path: root/target/moxie
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-03-28 11:26:22 -1000
committerRichard Henderson <richard.henderson@linaro.org>2019-06-10 07:03:42 -0700
commit7506ed902eb97fe4e2a1dd16766c621d32ecc40d (patch)
treefcbd11f0a3306da8767ec90b41ccf016e9339bab /target/moxie
parent677c4d69ac21961e76a386f9bfc892a44923acc0 (diff)
cpu: Introduce cpu_set_cpustate_pointers
Consolidate some boilerplate from foo_cpu_initfn. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/moxie')
-rw-r--r--target/moxie/cpu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/moxie/cpu.c b/target/moxie/cpu.c
index 02b2b47574..4688cee8c1 100644
--- a/target/moxie/cpu.c
+++ b/target/moxie/cpu.c
@@ -74,10 +74,9 @@ static void moxie_cpu_realizefn(DeviceState *dev, Error **errp)
static void moxie_cpu_initfn(Object *obj)
{
- CPUState *cs = CPU(obj);
MoxieCPU *cpu = MOXIE_CPU(obj);
- cs->env_ptr = &cpu->env;
+ cpu_set_cpustate_pointers(cpu);
}
static ObjectClass *moxie_cpu_class_by_name(const char *cpu_model)