diff options
author | Igor Mammedov <imammedo@redhat.com> | 2012-06-19 15:39:46 +0200 |
---|---|---|
committer | Igor Mammedov <imammedo@redhat.com> | 2012-06-25 15:40:03 +0200 |
commit | d65e9815b1ff90dff35e4e679bfb231c24e408f7 (patch) | |
tree | 2f4019a11fdeae624184db916e7b15e686a9c81b /target-i386/helper.c | |
parent | 84e3b6025930cd474d3ca9f1885801dbc100cecb (diff) |
target-i386: move tcg initialization into x86_cpu_initfn()
In order to make cpu object not depended on external ad-hoc
initialization routines, move tcg initialization from cpu_x86_init
inside cpu object "x86_cpu_initfn()".
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r-- | target-i386/helper.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index b9384f6f1b..c52ec130e5 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -941,7 +941,7 @@ int check_hw_breakpoints(CPUX86State *env, int force_dr6_update) return hit_enabled; } -static void breakpoint_handler(CPUX86State *env) +void breakpoint_handler(CPUX86State *env) { CPUBreakpoint *bp; @@ -1151,20 +1151,11 @@ X86CPU *cpu_x86_init(const char *cpu_model) { X86CPU *cpu; CPUX86State *env; - static int inited; cpu = X86_CPU(object_new(TYPE_X86_CPU)); env = &cpu->env; env->cpu_model_str = cpu_model; - /* init various static tables used in TCG mode */ - if (tcg_enabled() && !inited) { - inited = 1; - optimize_flags_init(); -#ifndef CONFIG_USER_ONLY - cpu_set_debug_excp_handler(breakpoint_handler); -#endif - } if (cpu_x86_register(cpu, cpu_model) < 0) { object_delete(OBJECT(cpu)); return NULL; |