Commit 568b600d858a7bcb94ed4520a13ad1629750e03f
1 parent
bc2c3909
report C0 status correctly (Ralf Baechle)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1477 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
11 additions
and
1 deletions
target-mips/translate.c
@@ -1454,6 +1454,7 @@ void cpu_dump_state (CPUState *env, FILE *f, | @@ -1454,6 +1454,7 @@ void cpu_dump_state (CPUState *env, FILE *f, | ||
1454 | int (*cpu_fprintf)(FILE *f, const char *fmt, ...), | 1454 | int (*cpu_fprintf)(FILE *f, const char *fmt, ...), |
1455 | int flags) | 1455 | int flags) |
1456 | { | 1456 | { |
1457 | + uint32_t c0_status; | ||
1457 | int i; | 1458 | int i; |
1458 | 1459 | ||
1459 | cpu_fprintf(f, "pc=0x%08x HI=0x%08x LO=0x%08x ds %04x %08x %d\n", | 1460 | 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, | @@ -1465,8 +1466,17 @@ void cpu_dump_state (CPUState *env, FILE *f, | ||
1465 | if ((i & 3) == 3) | 1466 | if ((i & 3) == 3) |
1466 | cpu_fprintf(f, "\n"); | 1467 | cpu_fprintf(f, "\n"); |
1467 | } | 1468 | } |
1469 | + | ||
1470 | + c0_status = env->CP0_Status; | ||
1471 | + if (env->hflags & MIPS_HFLAG_UM) | ||
1472 | + c0_status |= (1 << CP0St_UM); | ||
1473 | + if (env->hflags & MIPS_HFLAG_ERL) | ||
1474 | + c0_status |= (1 << CP0St_ERL); | ||
1475 | + if (env->hflags & MIPS_HFLAG_EXL) | ||
1476 | + c0_status |= (1 << CP0St_EXL); | ||
1477 | + | ||
1468 | cpu_fprintf(f, "CP0 Status 0x%08x Cause 0x%08x EPC 0x%08x\n", | 1478 | cpu_fprintf(f, "CP0 Status 0x%08x Cause 0x%08x EPC 0x%08x\n", |
1469 | - env->CP0_Status, env->CP0_Cause, env->CP0_EPC); | 1479 | + c0_status, env->CP0_Cause, env->CP0_EPC); |
1470 | cpu_fprintf(f, " Config0 0x%08x Config1 0x%08x LLAddr 0x%08x\n", | 1480 | cpu_fprintf(f, " Config0 0x%08x Config1 0x%08x LLAddr 0x%08x\n", |
1471 | env->CP0_Config0, env->CP0_Config1, env->CP0_LLAddr); | 1481 | env->CP0_Config0, env->CP0_Config1, env->CP0_LLAddr); |
1472 | } | 1482 | } |