diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-20 01:36:47 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-02-16 14:50:59 +0100 |
commit | d9c27f00b174df070470d48d6577042d2186d969 (patch) | |
tree | db1dee3c47ae884d1560da451512d370a1a0b321 /target-unicore32/helper.c | |
parent | 5266d20a12f2ef01841aad5f1692d73551a39dac (diff) |
target-unicore32: Move TCG initialization to UniCore32CPU initfn
Normalize the "inited" logic and add a tcg_enabled() check to suppress
it for qtest.
Ensures that a QOM-created UniCore32CPU is usable.
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-unicore32/helper.c')
-rw-r--r-- | target-unicore32/helper.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c index 2442133319..7eeb9bc633 100644 --- a/target-unicore32/helper.c +++ b/target-unicore32/helper.c @@ -30,7 +30,6 @@ CPUUniCore32State *uc32_cpu_init(const char *cpu_model) UniCore32CPU *cpu; CPUUniCore32State *env; ObjectClass *oc; - static int inited = 1; oc = cpu_class_by_name(TYPE_UNICORE32_CPU, cpu_model); if (oc == NULL) { @@ -40,11 +39,6 @@ CPUUniCore32State *uc32_cpu_init(const char *cpu_model) env = &cpu->env; env->cpu_model_str = cpu_model; - if (inited) { - inited = 0; - uc32_translate_init(); - } - object_property_set_bool(OBJECT(cpu), true, "realized", NULL); return env; |