aboutsummaryrefslogtreecommitdiff
path: root/target-m68k/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-08-14 07:59:16 -0700
committerLaurent Vivier <laurent@vivier.eu>2016-10-25 20:54:47 +0200
commit8e394ccabdb1e439aab092de6b9d2f26432e962f (patch)
treee8d3c73aa67f370204b764440deb3ea6feedaa99 /target-m68k/translate.c
parent9fdb533fb129b19610941bd1e5dd93e7471a18f5 (diff)
target-m68k: Print flags properly
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'target-m68k/translate.c')
-rw-r--r--target-m68k/translate.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index edd8744d20..cecd12c984 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -3140,15 +3140,15 @@ void m68k_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
for (i = 0; i < 8; i++)
{
u.d = env->fregs[i];
- cpu_fprintf (f, "D%d = %08x A%d = %08x F%d = %08x%08x (%12g)\n",
- i, env->dregs[i], i, env->aregs[i],
- i, u.l.upper, u.l.lower, *(double *)&u.d);
+ cpu_fprintf(f, "D%d = %08x A%d = %08x F%d = %08x%08x (%12g)\n",
+ i, env->dregs[i], i, env->aregs[i],
+ i, u.l.upper, u.l.lower, *(double *)&u.d);
}
cpu_fprintf (f, "PC = %08x ", env->pc);
- sr = env->sr;
- cpu_fprintf (f, "SR = %04x %c%c%c%c%c ", sr, (sr & 0x10) ? 'X' : '-',
- (sr & CCF_N) ? 'N' : '-', (sr & CCF_Z) ? 'Z' : '-',
- (sr & CCF_V) ? 'V' : '-', (sr & CCF_C) ? 'C' : '-');
+ sr = env->sr | cpu_m68k_flush_flags(env, env->cc_op) | env->cc_x * CCF_X;
+ cpu_fprintf(f, "SR = %04x %c%c%c%c%c ", sr, (sr & CCF_X) ? 'X' : '-',
+ (sr & CCF_N) ? 'N' : '-', (sr & CCF_Z) ? 'Z' : '-',
+ (sr & CCF_V) ? 'V' : '-', (sr & CCF_C) ? 'C' : '-');
cpu_fprintf (f, "FPRESULT = %12g\n", *(double *)&env->fp_result);
}