mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target-cris: Move TCG initialization to CRISCPU initfn
Split out TCG initialization from cpu_cris_init(). Avoid CPUCRISState dependency for v10-specific initialization and for non-v10 by inlining the decision into the initfn as well. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
79614b781d
commit
d1a94fec3d
4 changed files with 19 additions and 18 deletions
|
@ -70,8 +70,18 @@ static void cris_cpu_initfn(Object *obj)
|
|||
{
|
||||
CRISCPU *cpu = CRIS_CPU(obj);
|
||||
CPUCRISState *env = &cpu->env;
|
||||
static bool tcg_initialized;
|
||||
|
||||
cpu_exec_init(env);
|
||||
|
||||
if (tcg_enabled() && !tcg_initialized) {
|
||||
tcg_initialized = true;
|
||||
if (env->pregs[PR_VR] < 32) {
|
||||
cris_initialize_crisv10_tcg();
|
||||
} else {
|
||||
cris_initialize_tcg();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void cris_cpu_class_init(ObjectClass *oc, void *data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue