summaryrefslogtreecommitdiff
path: root/target-sparc/cpu.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-20 01:34:18 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:59 +0100
commit5266d20a12f2ef01841aad5f1692d73551a39dac (patch)
tree313e72a3123520de3c039161bdfb880203c3c74f /target-sparc/cpu.c
parentaa7408ec18c3517b2476a3671cd0b7f171241e2d (diff)
downloadqemu-5266d20a12f2ef01841aad5f1692d73551a39dac.tar.gz
qemu-5266d20a12f2ef01841aad5f1692d73551a39dac.tar.bz2
qemu-5266d20a12f2ef01841aad5f1692d73551a39dac.zip
target-sparc: Move TCG initialization to SPARCCPU initfn
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-sparc/cpu.c')
-rw-r--r--target-sparc/cpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index 1690cf5b15..759be532a3 100644
--- a/target-sparc/cpu.c
+++ b/target-sparc/cpu.c
@@ -114,10 +114,6 @@ SPARCCPU *cpu_sparc_init(const char *cpu_model)
cpu = SPARC_CPU(object_new(TYPE_SPARC_CPU));
env = &cpu->env;
- if (tcg_enabled()) {
- gen_intermediate_code_init(env);
- }
-
if (cpu_sparc_register(env, cpu_model) < 0) {
object_unref(OBJECT(cpu));
return NULL;
@@ -868,6 +864,10 @@ static void sparc_cpu_initfn(Object *obj)
CPUSPARCState *env = &cpu->env;
cpu_exec_init(env);
+
+ if (tcg_enabled()) {
+ gen_intermediate_code_init(env);
+ }
}
static void sparc_cpu_uninitfn(Object *obj)