]> git.proxmox.com Git - qemu.git/commitdiff
Get rid of user_mode_only
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 14 Jan 2009 19:40:27 +0000 (19:40 +0000)
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 14 Jan 2009 19:40:27 +0000 (19:40 +0000)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6305 c046a42c-6fe2-441c-8c8c-71466251a162

bsd-user/main.c
cpu-defs.h
cpu-exec.c
darwin-user/main.c
linux-user/main.c
target-sparc/helper.c
tests/qruncom.c

index 636f1dca05dc7bc71d16d8f7a6a1aafcfce9994b..45f0bc5823df103e93224fb238ef481fa85bc4c3 100644 (file)
@@ -558,7 +558,6 @@ int main(int argc, char **argv)
     init_task_state(ts);
     ts->info = info;
     env->opaque = ts;
-    env->user_mode_only = 1;
 
 #if defined(TARGET_SPARC)
     {
index b0e3f18cbc7c745e888220b75ad7a327a0c7454e..758fa9f2ca45a0d5097414b646daa6db50882a4a 100644 (file)
@@ -201,8 +201,6 @@ typedef struct CPUWatchpoint {
     jmp_buf jmp_env;                                                    \
     int exception_index;                                                \
                                                                         \
-    int user_mode_only;                                                 \
-                                                                        \
     void *next_cpu; /* next CPU sharing TB cache */                     \
     int cpu_index; /* CPU index (informative) */                        \
     int running; /* Nonzero if cpu is currently running(usermode).  */  \
index 07ddd0eda27b7442e59a972c88a2fcfb11ada663..b40e74a0c43716c931f92cae2331e72978afc1c3 100644 (file)
@@ -263,7 +263,8 @@ int cpu_exec(CPUState *env1)
                     if (ret == EXCP_DEBUG)
                         cpu_handle_debug_exception(env);
                     break;
-                } else if (env->user_mode_only) {
+                } else {
+#if defined(CONFIG_USER_ONLY)
                     /* if user mode only, we simulate a fake exception
                        which will be handled outside the cpu execution
                        loop */
@@ -277,7 +278,7 @@ int cpu_exec(CPUState *env1)
 #endif
                     ret = env->exception_index;
                     break;
-                } else {
+#else
 #if defined(TARGET_I386)
                     /* simulate a real cpu exception. On i386, it can
                        trigger new exceptions, but we do not handle
@@ -304,6 +305,7 @@ int cpu_exec(CPUState *env1)
                     do_interrupt(env);
 #elif defined(TARGET_M68K)
                     do_interrupt(0);
+#endif
 #endif
                 }
                 env->exception_index = -1;
index 3edad73d286a737bdad59a9f28dd298843be30fd..b1011cda942d655d13b5c11737b31edaeab556c5 100644 (file)
@@ -896,7 +896,6 @@ int main(int argc, char **argv)
     memset(ts, 0, sizeof(TaskState));
     env->opaque = ts;
     ts->used = 1;
-    env->user_mode_only = 1;
 
 #if defined(TARGET_I386)
     cpu_x86_set_cpl(env, 3);
index 5724f87e589e343f101ed0628519f6c15d8c3c60..4b62d94a6c0edce5bca7b1a5adf6b4d7c9abd019 100644 (file)
@@ -2421,7 +2421,6 @@ int main(int argc, char **argv, char **envp)
     init_task_state(ts);
     ts->info = info;
     env->opaque = ts;
-    env->user_mode_only = 1;
 
 #if defined(TARGET_I386)
     cpu_x86_set_cpl(env, 3);
index d2865ee7d5f0937a34af75d5f42f1a1d1723fef8..d34b8376378c4ee888b32835c203d9419bfe3e86 100644 (file)
@@ -644,7 +644,6 @@ void cpu_reset(CPUSPARCState *env)
     env->wim = 1;
     env->regwptr = env->regbase + (env->cwp * 16);
 #if defined(CONFIG_USER_ONLY)
-    env->user_mode_only = 1;
 #ifdef TARGET_SPARC64
     env->cleanwin = env->nwindows - 2;
     env->cansave = env->nwindows - 2;
index 6bc0b2b2d4a16ca36e6b59ec7a7ceea0487a88af..5e503bcccf209da4bd39543e7136198226a3e91d 100644 (file)
@@ -199,10 +199,6 @@ int main(int argc, char **argv)
 
     env = cpu_init("qemu32");
 
-    /* set user mode state (XXX: should be done automatically by
-       cpu_init ?) */
-    env->user_mode_only = 1;
-
     cpu_x86_set_cpl(env, 3);
 
     env->cr[0] = CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK;