提交 7496f526 编写于 作者: B bellard

cpu_single_env init


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@967 c046a42c-6fe2-441c-8c8c-71466251a162
上级 91d848eb
...@@ -815,6 +815,7 @@ CPUARMState *cpu_arm_init(void) ...@@ -815,6 +815,7 @@ CPUARMState *cpu_arm_init(void)
if (!env) if (!env)
return NULL; return NULL;
memset(env, 0, sizeof(CPUARMState)); memset(env, 0, sizeof(CPUARMState));
cpu_single_env = env;
return env; return env;
} }
......
...@@ -75,9 +75,9 @@ CPUX86State *cpu_x86_init(void) ...@@ -75,9 +75,9 @@ CPUX86State *cpu_x86_init(void)
modify_ldt(1, &ldt, sizeof(ldt)); /* write ldt entry */ modify_ldt(1, &ldt, sizeof(ldt)); /* write ldt entry */
asm volatile ("movl %0, %%fs" : : "r" ((1 << 3) | 7)); asm volatile ("movl %0, %%fs" : : "r" ((1 << 3) | 7));
cpu_single_env = env;
} }
#endif #endif
cpu_single_env = env;
cpu_reset(env); cpu_reset(env);
return env; return env;
} }
......
...@@ -2994,7 +2994,7 @@ CPUPPCState *cpu_ppc_init(void) ...@@ -2994,7 +2994,7 @@ CPUPPCState *cpu_ppc_init(void)
env->nip = 0xFFFFFFFC; env->nip = 0xFFFFFFFC;
#endif #endif
env->access_type = ACCESS_INT; env->access_type = ACCESS_INT;
cpu_single_env = env;
return env; return env;
} }
......
...@@ -840,6 +840,7 @@ CPUSPARCState *cpu_sparc_init(void) ...@@ -840,6 +840,7 @@ CPUSPARCState *cpu_sparc_init(void)
env->wim = 1; env->wim = 1;
env->regwptr = env->regbase + (env->cwp * 16); env->regwptr = env->regbase + (env->cwp * 16);
env->user_mode_only = 1; env->user_mode_only = 1;
cpu_single_env = env;
return (env); return (env);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册