From 24c7b0e330fdbfcfe87f515d79e67156c57cbc4f Mon Sep 17 00:00:00 2001 From: ths Date: Fri, 30 Mar 2007 16:44:54 +0000 Subject: Sanitize mips exception handling. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2546 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-mips/op_helper.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'target-mips/op_helper.c') 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); } } -- cgit 1.4.1