aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2012-08-09 18:44:49 +0000
committerBlue Swirl <blauwirbel@gmail.com>2012-08-09 18:44:49 +0000
commitd3da41e32bc6d6fac80d402aa1cc0f1d30539d98 (patch)
tree6c19d94ccf6f054ae6fc6d26d94131a1dd577519 /target-i386/cpu.c
parent8227421e0476d9caf2a9a089465bb40c23834e33 (diff)
parentd65e9815b1ff90dff35e4e679bfb231c24e408f7 (diff)
Merge branch 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu
* 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu: target-i386: move tcg initialization into x86_cpu_initfn() cleanup cpu_set_debug_excp_handler target-xtensa: drop usage of prev_debug_excp_handler target-i386: drop usage of prev_debug_excp_handler
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r--target-i386/cpu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 857b94ea87..880cfea3f8 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1746,6 +1746,7 @@ static void x86_cpu_initfn(Object *obj)
{
X86CPU *cpu = X86_CPU(obj);
CPUX86State *env = &cpu->env;
+ static int inited;
cpu_exec_init(env);
@@ -1775,6 +1776,15 @@ static void x86_cpu_initfn(Object *obj)
x86_cpuid_set_tsc_freq, NULL, NULL, NULL);
env->cpuid_apic_id = env->cpu_index;
+
+ /* 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
+ }
}
static void x86_cpu_common_class_init(ObjectClass *oc, void *data)