aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsd-user/main.c1
-rw-r--r--cpu-defs.h2
-rw-r--r--cpu-exec.c6
-rw-r--r--darwin-user/main.c1
-rw-r--r--linux-user/main.c1
-rw-r--r--target-sparc/helper.c1
-rw-r--r--tests/qruncom.c4
7 files changed, 4 insertions, 12 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 636f1dca05..45f0bc5823 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -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)
{
diff --git a/cpu-defs.h b/cpu-defs.h
index b0e3f18cbc..758fa9f2ca 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -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). */ \
diff --git a/cpu-exec.c b/cpu-exec.c
index 07ddd0eda2..b40e74a0c4 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -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
@@ -305,6 +306,7 @@ int cpu_exec(CPUState *env1)
#elif defined(TARGET_M68K)
do_interrupt(0);
#endif
+#endif
}
env->exception_index = -1;
}
diff --git a/darwin-user/main.c b/darwin-user/main.c
index 3edad73d28..b1011cda94 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -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);
diff --git a/linux-user/main.c b/linux-user/main.c
index 5724f87e58..4b62d94a6c 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -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);
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index d2865ee7d5..d34b837637 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -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;
diff --git a/tests/qruncom.c b/tests/qruncom.c
index 6bc0b2b2d4..5e503bcccf 100644
--- a/tests/qruncom.c
+++ b/tests/qruncom.c
@@ -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;