Revision 72d239ed

b/bsd-user/main.c
558 558
    init_task_state(ts);
559 559
    ts->info = info;
560 560
    env->opaque = ts;
561
    env->user_mode_only = 1;
562 561

  
563 562
#if defined(TARGET_SPARC)
564 563
    {
b/cpu-defs.h
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).  */  \
b/cpu-exec.c
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 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 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
            }
b/darwin-user/main.c
896 896
    memset(ts, 0, sizeof(TaskState));
897 897
    env->opaque = ts;
898 898
    ts->used = 1;
899
    env->user_mode_only = 1;
900 899

  
901 900
#if defined(TARGET_I386)
902 901
    cpu_x86_set_cpl(env, 3);
b/linux-user/main.c
2421 2421
    init_task_state(ts);
2422 2422
    ts->info = info;
2423 2423
    env->opaque = ts;
2424
    env->user_mode_only = 1;
2425 2424

  
2426 2425
#if defined(TARGET_I386)
2427 2426
    cpu_x86_set_cpl(env, 3);
b/target-sparc/helper.c
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;
b/tests/qruncom.c
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;

Also available in: Unified diff