diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-06-22 10:56:50 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-06-22 10:56:50 +0000 |
commit | 7496f5266c568ceef2d4a3a2d0af381cf1810e30 (patch) | |
tree | 46be97b74b5f74b6a487c66f84838189597c6a7e | |
parent | 91d848ebf3bc7fd73fb1a4fc11bdb04225b3f37d (diff) |
cpu_single_env init
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@967 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-arm/translate.c | 1 | ||||
-rw-r--r-- | target-i386/helper2.c | 2 | ||||
-rw-r--r-- | target-ppc/translate.c | 2 | ||||
-rw-r--r-- | target-sparc/translate.c | 1 |
4 files changed, 4 insertions, 2 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index 00bdbb98ac..3185286bbc 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -815,6 +815,7 @@ CPUARMState *cpu_arm_init(void) if (!env) return NULL; memset(env, 0, sizeof(CPUARMState)); + cpu_single_env = env; return env; } diff --git a/target-i386/helper2.c b/target-i386/helper2.c index 455b348a0a..06c732edce 100644 --- a/target-i386/helper2.c +++ b/target-i386/helper2.c @@ -75,9 +75,9 @@ CPUX86State *cpu_x86_init(void) modify_ldt(1, &ldt, sizeof(ldt)); /* write ldt entry */ asm volatile ("movl %0, %%fs" : : "r" ((1 << 3) | 7)); - cpu_single_env = env; } #endif + cpu_single_env = env; cpu_reset(env); return env; } diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 1489c462f5..a3133fdfcf 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -2994,7 +2994,7 @@ CPUPPCState *cpu_ppc_init(void) env->nip = 0xFFFFFFFC; #endif env->access_type = ACCESS_INT; - + cpu_single_env = env; return env; } diff --git a/target-sparc/translate.c b/target-sparc/translate.c index bcc810b208..fe37c0748f 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -840,6 +840,7 @@ CPUSPARCState *cpu_sparc_init(void) env->wim = 1; env->regwptr = env->regbase + (env->cwp * 16); env->user_mode_only = 1; + cpu_single_env = env; return (env); } |