diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-07-02 15:28:16 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-07-02 15:28:16 +0000 |
commit | 568b600d858a7bcb94ed4520a13ad1629750e03f (patch) | |
tree | 64e9883050ea942c220129b3c8a0abe958b63fb3 /target-mips | |
parent | bc2c390907757c4d172279e81395b8818338abec (diff) | |
download | qemu-568b600d858a7bcb94ed4520a13ad1629750e03f.zip |
report C0 status correctly (Ralf Baechle)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1477 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips')
-rw-r--r-- | target-mips/translate.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c index d781fccfbd..f5529c1b31 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -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); } |