cpu_single_env init
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 22 Jun 2004 10:56:50 +0000 (10:56 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 22 Jun 2004 10:56:50 +0000 (10:56 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@967 c046a42c-6fe2-441c-8c8c-71466251a162

target-arm/translate.c
target-i386/helper2.c
target-ppc/translate.c
target-sparc/translate.c

index 00bdbb9..3185286 100644 (file)
@@ -815,6 +815,7 @@ CPUARMState *cpu_arm_init(void)
     if (!env)
         return NULL;
     memset(env, 0, sizeof(CPUARMState));
+    cpu_single_env = env;
     return env;
 }
 
index 455b348..06c732e 100644 (file)
@@ -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;
 }
index 1489c46..a3133fd 100644 (file)
@@ -2994,7 +2994,7 @@ CPUPPCState *cpu_ppc_init(void)
     env->nip = 0xFFFFFFFC;
 #endif
     env->access_type = ACCESS_INT;
-
+    cpu_single_env = env;
     return env;
 }
 
index bcc810b..fe37c07 100644 (file)
@@ -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);
 }