aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op_helper.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-28 19:45:05 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-28 19:45:05 +0000
commit623a930ec30a75e6d6482ca8208d7bf1ca8d359b (patch)
tree6953605abd679c357ffba546fd43907a4ce9ea0e /target-mips/op_helper.c
parent8e129e0748f866d730f1e39bff296219fedac244 (diff)
Implement missing MIPS supervisor mode bits.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3472 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r--target-mips/op_helper.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index ff26ab5afa..3c04c55d83 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -315,8 +315,12 @@ void do_mtc0_status_debug(uint32_t old, uint32_t val)
old, old & env->CP0_Cause & CP0Ca_IP_mask,
val, val & env->CP0_Cause & CP0Ca_IP_mask,
env->CP0_Cause);
- (env->hflags & MIPS_HFLAG_UM) ? fputs(", UM\n", logfile)
- : fputs("\n", logfile);
+ switch (env->hflags & MIPS_HFLAG_KSU) {
+ case MIPS_HFLAG_UM: fputs(", UM\n", logfile); break;
+ case MIPS_HFLAG_SM: fputs(", SM\n", logfile); break;
+ case MIPS_HFLAG_KM: fputs("\n", logfile); break;
+ default: cpu_abort(env, "Invalid MMU mode!\n"); break;
+ }
}
void do_mtc0_status_irqraise_debug(void)
@@ -518,10 +522,12 @@ void debug_post_eret (void)
fprintf(logfile, " ErrorEPC " TARGET_FMT_lx, env->CP0_ErrorEPC);
if (env->hflags & MIPS_HFLAG_DM)
fprintf(logfile, " DEPC " TARGET_FMT_lx, env->CP0_DEPC);
- if (env->hflags & MIPS_HFLAG_UM)
- fputs(", UM\n", logfile);
- else
- fputs("\n", logfile);
+ switch (env->hflags & MIPS_HFLAG_KSU) {
+ case MIPS_HFLAG_UM: fputs(", UM\n", logfile); break;
+ case MIPS_HFLAG_SM: fputs(", SM\n", logfile); break;
+ case MIPS_HFLAG_KM: fputs("\n", logfile); break;
+ default: cpu_abort(env, "Invalid MMU mode!\n"); break;
+ }
}
void do_pmon (int function)