summaryrefslogtreecommitdiffstats
path: root/target-mips/op_helper.c
diff options
context:
space:
mode:
authorths2007-03-30 18:44:54 +0200
committerths2007-03-30 18:44:54 +0200
commit24c7b0e330fdbfcfe87f515d79e67156c57cbc4f (patch)
tree50ed71bd4fc4c3fc0e6fc5cccb222417244b5baa /target-mips/op_helper.c
parentFix build failure. (diff)
downloadqemu-24c7b0e330fdbfcfe87f515d79e67156c57cbc4f.tar.gz
qemu-24c7b0e330fdbfcfe87f515d79e67156c57cbc4f.tar.xz
qemu-24c7b0e330fdbfcfe87f515d79e67156c57cbc4f.zip
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.c8
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);
}
}