From 623a930ec30a75e6d6482ca8208d7bf1ca8d359b Mon Sep 17 00:00:00 2001 From: ths Date: Sun, 28 Oct 2007 19:45:05 +0000 Subject: Implement missing MIPS supervisor mode bits. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3472 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-mips/op_helper.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'target-mips/op_helper.c') 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) -- cgit v1.2.3