diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-30 16:44:54 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-30 16:44:54 +0000 |
commit | 24c7b0e330fdbfcfe87f515d79e67156c57cbc4f (patch) | |
tree | 50ed71bd4fc4c3fc0e6fc5cccb222417244b5baa /target-mips/op_helper.c | |
parent | e69f67b6d58f366ffaa83a0973948edd1f74b370 (diff) |
Sanitize mips exception handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2546 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r-- | target-mips/op_helper.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 8ab7bf57d4..f9748fc16b 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -509,9 +509,11 @@ void dump_sc (void) void debug_eret (void) { if (loglevel) { - fprintf(logfile, "ERET: pc " TARGET_FMT_lx " EPC " TARGET_FMT_lx " ErrorEPC " TARGET_FMT_lx " (%d)\n", - env->PC, env->CP0_EPC, env->CP0_ErrorEPC, - env->hflags & MIPS_HFLAG_ERL ? 1 : 0); + fprintf(logfile, "ERET: pc " TARGET_FMT_lx " EPC " TARGET_FMT_lx, + env->PC, env->CP0_EPC); + if (env->CP0_Status & (1 << CP0St_ERL)) + fprintf(logfile, " ErrorEPC " TARGET_FMT_lx, env->CP0_ErrorEPC); + fputs("\n", logfile); } } |