Revision 173d6cfe
b/target-arm/translate.c | ||
---|---|---|
2199 | 2199 |
{ |
2200 | 2200 |
CPUARMState *env; |
2201 | 2201 |
|
2202 |
cpu_exec_init(); |
|
2203 |
|
|
2204 |
env = malloc(sizeof(CPUARMState)); |
|
2202 |
env = qemu_mallocz(sizeof(CPUARMState)); |
|
2205 | 2203 |
if (!env) |
2206 | 2204 |
return NULL; |
2207 |
memset(env, 0, sizeof(CPUARMState)); |
|
2208 |
cpu_single_env = env; |
|
2205 |
cpu_exec_init(env); |
|
2209 | 2206 |
return env; |
2210 | 2207 |
} |
2211 | 2208 |
|
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); |
b/target-mips/translate.c | ||
---|---|---|
1694 | 1694 |
{ |
1695 | 1695 |
CPUMIPSState *env; |
1696 | 1696 |
|
1697 |
cpu_exec_init(); |
|
1698 | 1697 |
env = qemu_mallocz(sizeof(CPUMIPSState)); |
1699 | 1698 |
if (!env) |
1700 | 1699 |
return NULL; |
1700 |
cpu_exec_init(env); |
|
1701 | 1701 |
tlb_flush(env, 1); |
1702 | 1702 |
/* Minimal init */ |
1703 | 1703 |
env->PC = 0xBFC00000; |
... | ... | |
1722 | 1722 |
env->CP0_Debug = (1 << CP0DB_CNT) | (0x1 << CP0DB_VER); |
1723 | 1723 |
env->CP0_PRid = MIPS_CPU; |
1724 | 1724 |
env->exception_index = EXCP_NONE; |
1725 |
|
|
1726 |
cpu_single_env = env; |
|
1727 |
|
|
1728 | 1725 |
return env; |
1729 | 1726 |
} |
b/target-ppc/translate_init.c | ||
---|---|---|
1081 | 1081 |
{ |
1082 | 1082 |
CPUPPCState *env; |
1083 | 1083 |
|
1084 |
cpu_exec_init(); |
|
1085 |
|
|
1086 | 1084 |
env = qemu_mallocz(sizeof(CPUPPCState)); |
1087 | 1085 |
if (!env) |
1088 | 1086 |
return NULL; |
1087 |
cpu_exec_init(env); |
|
1089 | 1088 |
tlb_flush(env, 1); |
1090 | 1089 |
#if defined (DO_SINGLE_STEP) && 0 |
1091 | 1090 |
/* Single step trace mode */ |
... | ... | |
1101 | 1100 |
#endif |
1102 | 1101 |
do_compute_hflags(env); |
1103 | 1102 |
env->reserve = -1; |
1104 |
cpu_single_env = env; |
|
1105 | 1103 |
return env; |
1106 | 1104 |
} |
1107 | 1105 |
|
Also available in: Unified diff