]> git.proxmox.com Git - qemu.git/commitdiff
report C0 status correctly (Ralf Baechle)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 2 Jul 2005 15:28:16 +0000 (15:28 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 2 Jul 2005 15:28:16 +0000 (15:28 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1477 c046a42c-6fe2-441c-8c8c-71466251a162

target-mips/translate.c

index d781fccfbdb62788fbb0dbb688e7aaab649817fe..f5529c1b3167db8b5a42795bb66b6c4d954e14d7 100644 (file)
@@ -1454,6 +1454,7 @@ void cpu_dump_state (CPUState *env, FILE *f,
                      int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
                      int flags)
 {
+    uint32_t c0_status;
     int i;
     
     cpu_fprintf(f, "pc=0x%08x HI=0x%08x LO=0x%08x ds %04x %08x %d\n",
@@ -1465,8 +1466,17 @@ void cpu_dump_state (CPUState *env, FILE *f,
         if ((i & 3) == 3)
             cpu_fprintf(f, "\n");
     }
+
+    c0_status = env->CP0_Status;
+    if (env->hflags & MIPS_HFLAG_UM)
+        c0_status |= (1 << CP0St_UM);
+    if (env->hflags & MIPS_HFLAG_ERL)
+        c0_status |= (1 << CP0St_ERL);
+    if (env->hflags & MIPS_HFLAG_EXL)
+        c0_status |= (1 << CP0St_EXL);
+
     cpu_fprintf(f, "CP0 Status  0x%08x Cause   0x%08x EPC    0x%08x\n",
-                env->CP0_Status, env->CP0_Cause, env->CP0_EPC);
+                c0_status, env->CP0_Cause, env->CP0_EPC);
     cpu_fprintf(f, "    Config0 0x%08x Config1 0x%08x LLAddr 0x%08x\n",
                 env->CP0_Config0, env->CP0_Config1, env->CP0_LLAddr);
 }