Commit 7496f5266c568ceef2d4a3a2d0af381cf1810e30

Authored by bellard
1 parent 91d848eb

cpu_single_env init


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@967 c046a42c-6fe2-441c-8c8c-71466251a162
target-arm/translate.c
... ... @@ -815,6 +815,7 @@ CPUARMState *cpu_arm_init(void)
815 815 if (!env)
816 816 return NULL;
817 817 memset(env, 0, sizeof(CPUARMState));
  818 + cpu_single_env = env;
818 819 return env;
819 820 }
820 821  
... ...
target-i386/helper2.c
... ... @@ -75,9 +75,9 @@ CPUX86State *cpu_x86_init(void)
75 75 modify_ldt(1, &ldt, sizeof(ldt)); /* write ldt entry */
76 76  
77 77 asm volatile ("movl %0, %%fs" : : "r" ((1 << 3) | 7));
78   - cpu_single_env = env;
79 78 }
80 79 #endif
  80 + cpu_single_env = env;
81 81 cpu_reset(env);
82 82 return env;
83 83 }
... ...
target-ppc/translate.c
... ... @@ -2994,7 +2994,7 @@ CPUPPCState *cpu_ppc_init(void)
2994 2994 env->nip = 0xFFFFFFFC;
2995 2995 #endif
2996 2996 env->access_type = ACCESS_INT;
2997   -
  2997 + cpu_single_env = env;
2998 2998 return env;
2999 2999 }
3000 3000  
... ...
target-sparc/translate.c
... ... @@ -840,6 +840,7 @@ CPUSPARCState *cpu_sparc_init(void)
840 840 env->wim = 1;
841 841 env->regwptr = env->regbase + (env->cwp * 16);
842 842 env->user_mode_only = 1;
  843 + cpu_single_env = env;
843 844 return (env);
844 845 }
845 846  
... ...