aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op_helper.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-03-30 16:44:54 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-03-30 16:44:54 +0000
commit24c7b0e330fdbfcfe87f515d79e67156c57cbc4f (patch)
tree50ed71bd4fc4c3fc0e6fc5cccb222417244b5baa /target-mips/op_helper.c
parente69f67b6d58f366ffaa83a0973948edd1f74b370 (diff)
downloadqemu-24c7b0e330fdbfcfe87f515d79e67156c57cbc4f.zip
qemu-24c7b0e330fdbfcfe87f515d79e67156c57cbc4f.tar.gz
qemu-24c7b0e330fdbfcfe87f515d79e67156c57cbc4f.tar.bz2
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 8ab7bf5..f9748fc 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);
}
}