Revision 173d6cfe target-i386/helper2.c
b/target-i386/helper2.c | ||
---|---|---|
47 | 47 |
CPUX86State *env; |
48 | 48 |
static int inited; |
49 | 49 |
|
50 |
cpu_exec_init(); |
|
51 |
|
|
52 |
env = malloc(sizeof(CPUX86State)); |
|
50 |
env = qemu_mallocz(sizeof(CPUX86State)); |
|
53 | 51 |
if (!env) |
54 | 52 |
return NULL; |
55 |
memset(env, 0, sizeof(CPUX86State)); |
|
53 |
cpu_exec_init(env); |
|
54 |
|
|
56 | 55 |
/* init various static tables */ |
57 | 56 |
if (!inited) { |
58 | 57 |
inited = 1; |
... | ... | |
135 | 134 |
env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA; |
136 | 135 |
#endif |
137 | 136 |
} |
138 |
cpu_single_env = env; |
|
139 | 137 |
cpu_reset(env); |
140 | 138 |
#ifdef USE_KQEMU |
141 | 139 |
kqemu_init(env); |
Also available in: Unified diff