mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 22:11:53 -06:00
target/mips: Inline cpu_mips_realize_env() in mips_cpu_realizefn()
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20201206233949.3783184-17-f4bug@amsat.org>
This commit is contained in:
parent
c20cf02bbd
commit
7b884bf51e
1 changed files with 8 additions and 12 deletions
|
@ -104,17 +104,6 @@ static bool mips_cpu_has_work(CPUState *cs)
|
||||||
|
|
||||||
#include "translate_init.c.inc"
|
#include "translate_init.c.inc"
|
||||||
|
|
||||||
static void cpu_mips_realize_env(CPUMIPSState *env)
|
|
||||||
{
|
|
||||||
env->exception_base = (int32_t)0xBFC00000;
|
|
||||||
|
|
||||||
#ifndef CONFIG_USER_ONLY
|
|
||||||
mmu_init(env, env->cpu_model);
|
|
||||||
#endif
|
|
||||||
fpu_init(env, env->cpu_model);
|
|
||||||
mvp_init(env);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO QOM'ify CPU reset and remove */
|
/* TODO QOM'ify CPU reset and remove */
|
||||||
static void cpu_state_reset(CPUMIPSState *env)
|
static void cpu_state_reset(CPUMIPSState *env)
|
||||||
{
|
{
|
||||||
|
@ -400,6 +389,7 @@ static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||||
{
|
{
|
||||||
CPUState *cs = CPU(dev);
|
CPUState *cs = CPU(dev);
|
||||||
MIPSCPU *cpu = MIPS_CPU(dev);
|
MIPSCPU *cpu = MIPS_CPU(dev);
|
||||||
|
CPUMIPSState *env = &cpu->env;
|
||||||
MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);
|
MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);
|
||||||
Error *local_err = NULL;
|
Error *local_err = NULL;
|
||||||
|
|
||||||
|
@ -423,7 +413,13 @@ static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu_mips_realize_env(&cpu->env);
|
env->exception_base = (int32_t)0xBFC00000;
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
|
mmu_init(env, env->cpu_model);
|
||||||
|
#endif
|
||||||
|
fpu_init(env, env->cpu_model);
|
||||||
|
mvp_init(env);
|
||||||
|
|
||||||
cpu_reset(cs);
|
cpu_reset(cs);
|
||||||
qemu_init_vcpu(cs);
|
qemu_init_vcpu(cs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue