mirror of https://github.com/xqemu/xqemu.git
Enable -d cpu logging by default.
When -d cpu logging was handled by target-foo/translate.c, it was controled by DEBUG_DISAS, which is enabled by default. Use the same condition in cpu_exec. At the same time, reduce the if-deffery by assuming no flags update is required for the target. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
6f0f607f96
commit
a73b1fd9af
22
cpu-exec.c
22
cpu-exec.c
|
@ -546,40 +546,24 @@ int cpu_exec(CPUState *env1)
|
||||||
env->exception_index = EXCP_INTERRUPT;
|
env->exception_index = EXCP_INTERRUPT;
|
||||||
cpu_loop_exit();
|
cpu_loop_exit();
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_DEBUG_EXEC
|
#if defined(DEBUG_DISAS) || defined(CONFIG_DEBUG_EXEC)
|
||||||
if (qemu_loglevel_mask(CPU_LOG_TB_CPU)) {
|
if (qemu_loglevel_mask(CPU_LOG_TB_CPU)) {
|
||||||
/* restore flags in standard format */
|
/* restore flags in standard format */
|
||||||
#if defined(TARGET_I386)
|
#if defined(TARGET_I386)
|
||||||
env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK);
|
env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK);
|
||||||
log_cpu_state(env, X86_DUMP_CCOP);
|
log_cpu_state(env, X86_DUMP_CCOP);
|
||||||
env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
|
env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
|
||||||
#elif defined(TARGET_ARM)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#elif defined(TARGET_SPARC)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#elif defined(TARGET_PPC)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#elif defined(TARGET_M68K)
|
#elif defined(TARGET_M68K)
|
||||||
cpu_m68k_flush_flags(env, env->cc_op);
|
cpu_m68k_flush_flags(env, env->cc_op);
|
||||||
env->cc_op = CC_OP_FLAGS;
|
env->cc_op = CC_OP_FLAGS;
|
||||||
env->sr = (env->sr & 0xffe0)
|
env->sr = (env->sr & 0xffe0)
|
||||||
| env->cc_dest | (env->cc_x << 4);
|
| env->cc_dest | (env->cc_x << 4);
|
||||||
log_cpu_state(env, 0);
|
log_cpu_state(env, 0);
|
||||||
#elif defined(TARGET_MICROBLAZE)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#elif defined(TARGET_MIPS)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#elif defined(TARGET_SH4)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#elif defined(TARGET_ALPHA)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#elif defined(TARGET_CRIS)
|
|
||||||
log_cpu_state(env, 0);
|
|
||||||
#else
|
#else
|
||||||
#error unsupported target CPU
|
log_cpu_state(env, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* DEBUG_DISAS || CONFIG_DEBUG_EXEC */
|
||||||
spin_lock(&tb_lock);
|
spin_lock(&tb_lock);
|
||||||
tb = tb_find_fast();
|
tb = tb_find_fast();
|
||||||
/* Note: we do it here to avoid a gcc bug on Mac OS X when
|
/* Note: we do it here to avoid a gcc bug on Mac OS X when
|
||||||
|
|
Loading…
Reference in New Issue