Commit 72d239ed26db3f288e73b68b70fcf1bb06f67900
1 parent
1c918eba
Get rid of user_mode_only
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6305 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
7 changed files
with
4 additions
and
12 deletions
bsd-user/main.c
cpu-defs.h
... | ... | @@ -201,8 +201,6 @@ typedef struct CPUWatchpoint { |
201 | 201 | jmp_buf jmp_env; \ |
202 | 202 | int exception_index; \ |
203 | 203 | \ |
204 | - int user_mode_only; \ | |
205 | - \ | |
206 | 204 | void *next_cpu; /* next CPU sharing TB cache */ \ |
207 | 205 | int cpu_index; /* CPU index (informative) */ \ |
208 | 206 | int running; /* Nonzero if cpu is currently running(usermode). */ \ |
... | ... |
cpu-exec.c
... | ... | @@ -263,7 +263,8 @@ int cpu_exec(CPUState *env1) |
263 | 263 | if (ret == EXCP_DEBUG) |
264 | 264 | cpu_handle_debug_exception(env); |
265 | 265 | break; |
266 | - } else if (env->user_mode_only) { | |
266 | + } else { | |
267 | +#if defined(CONFIG_USER_ONLY) | |
267 | 268 | /* if user mode only, we simulate a fake exception |
268 | 269 | which will be handled outside the cpu execution |
269 | 270 | loop */ |
... | ... | @@ -277,7 +278,7 @@ int cpu_exec(CPUState *env1) |
277 | 278 | #endif |
278 | 279 | ret = env->exception_index; |
279 | 280 | break; |
280 | - } else { | |
281 | +#else | |
281 | 282 | #if defined(TARGET_I386) |
282 | 283 | /* simulate a real cpu exception. On i386, it can |
283 | 284 | trigger new exceptions, but we do not handle |
... | ... | @@ -305,6 +306,7 @@ int cpu_exec(CPUState *env1) |
305 | 306 | #elif defined(TARGET_M68K) |
306 | 307 | do_interrupt(0); |
307 | 308 | #endif |
309 | +#endif | |
308 | 310 | } |
309 | 311 | env->exception_index = -1; |
310 | 312 | } |
... | ... |
darwin-user/main.c
linux-user/main.c
target-sparc/helper.c
... | ... | @@ -644,7 +644,6 @@ void cpu_reset(CPUSPARCState *env) |
644 | 644 | env->wim = 1; |
645 | 645 | env->regwptr = env->regbase + (env->cwp * 16); |
646 | 646 | #if defined(CONFIG_USER_ONLY) |
647 | - env->user_mode_only = 1; | |
648 | 647 | #ifdef TARGET_SPARC64 |
649 | 648 | env->cleanwin = env->nwindows - 2; |
650 | 649 | env->cansave = env->nwindows - 2; |
... | ... |
tests/qruncom.c
... | ... | @@ -199,10 +199,6 @@ int main(int argc, char **argv) |
199 | 199 | |
200 | 200 | env = cpu_init("qemu32"); |
201 | 201 | |
202 | - /* set user mode state (XXX: should be done automatically by | |
203 | - cpu_init ?) */ | |
204 | - env->user_mode_only = 1; | |
205 | - | |
206 | 202 | cpu_x86_set_cpl(env, 3); |
207 | 203 | |
208 | 204 | env->cr[0] = CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK; |
... | ... |