diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2015-03-05 13:43:16 -0300 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2016-05-23 19:47:37 -0300 |
commit | 4fe15cdedf8728e58b8e475f8b1a26fb16aa9caa (patch) | |
tree | 2ae0b33d184ac1276c98b2bcc810e0eed73d357a /target-i386/cpu.c | |
parent | 3e2c0e062f0963a6b73b0cd1990fad79495463d9 (diff) |
target-i386: Move TCG initialization check to tcg_x86_init()
Instead of requiring cpu.c to check if TCG was already initialized,
simply let the function be called multiple times.
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r-- | target-i386/cpu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index e615486596..2dc3d3cf3b 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -3088,7 +3088,6 @@ static void x86_cpu_initfn(Object *obj) X86CPUClass *xcc = X86_CPU_GET_CLASS(obj); CPUX86State *env = &cpu->env; FeatureWord w; - static int inited; cs->env_ptr = env; cpu_exec_init(cs, &error_abort); @@ -3139,8 +3138,7 @@ static void x86_cpu_initfn(Object *obj) x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort); /* init various static tables used in TCG mode */ - if (tcg_enabled() && !inited) { - inited = 1; + if (tcg_enabled()) { tcg_x86_init(); } } |