diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-21 23:32:20 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-21 23:32:20 +0000 |
commit | 173d6cfe5129301a3a8f2570223aaa47a815f343 (patch) | |
tree | 383d89a9f3d4189748a5108b62c1eab89068a056 /target-i386/helper2.c | |
parent | 0e1fd3694e5386e791d86fb6bd7ead4d0c86bd9a (diff) |
cpu_exec_init() change
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1643 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper2.c')
-rw-r--r-- | target-i386/helper2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/target-i386/helper2.c b/target-i386/helper2.c index 60335909a2..943ff5907b 100644 --- a/target-i386/helper2.c +++ b/target-i386/helper2.c @@ -47,12 +47,11 @@ CPUX86State *cpu_x86_init(void) CPUX86State *env; static int inited; - cpu_exec_init(); - - env = malloc(sizeof(CPUX86State)); + env = qemu_mallocz(sizeof(CPUX86State)); if (!env) return NULL; - memset(env, 0, sizeof(CPUX86State)); + cpu_exec_init(env); + /* init various static tables */ if (!inited) { inited = 1; @@ -135,7 +134,6 @@ CPUX86State *cpu_x86_init(void) env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA; #endif } - cpu_single_env = env; cpu_reset(env); #ifdef USE_KQEMU kqemu_init(env); |