mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
cpu_dump_state: move DUMP_FPU and DUMP_CCOP flags from x86-only to generic
Move the DUMP_FPU and DUMP_CCOP flags for cpu_dump_state() from being x86-specific flags to being generic ones. This allows us to drop some TARGET_I386 ifdefs in various places, and means that we can (potentially) be more consistent across architectures about which monitor commands or debug abort printouts include FPU register contents and info about QEMU's condition-code optimisations. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
a14c74928b
commit
6fd2a026fb
10 changed files with 15 additions and 34 deletions
|
@ -1759,7 +1759,7 @@ static void x86_cpu_reset(CPUState *s)
|
|||
|
||||
if (qemu_loglevel_mask(CPU_LOG_RESET)) {
|
||||
qemu_log("CPU Reset (CPU %d)\n", env->cpu_index);
|
||||
log_cpu_state(env, X86_DUMP_FPU | X86_DUMP_CCOP);
|
||||
log_cpu_state(env, CPU_DUMP_FPU | CPU_DUMP_CCOP);
|
||||
}
|
||||
|
||||
xcc->parent_reset(s);
|
||||
|
|
|
@ -995,10 +995,6 @@ void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_cr4);
|
|||
void cpu_smm_update(CPUX86State *env);
|
||||
uint64_t cpu_get_tsc(CPUX86State *env);
|
||||
|
||||
/* used to debug */
|
||||
#define X86_DUMP_FPU 0x0001 /* dump FPU state too */
|
||||
#define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */
|
||||
|
||||
#define TARGET_PAGE_BITS 12
|
||||
|
||||
#ifdef TARGET_X86_64
|
||||
|
|
|
@ -284,7 +284,7 @@ void cpu_dump_state(CPUX86State *env, FILE *f, fprintf_function cpu_fprintf,
|
|||
cpu_fprintf(f, "\nDR6=" TARGET_FMT_lx " DR7=" TARGET_FMT_lx "\n",
|
||||
env->dr[6], env->dr[7]);
|
||||
}
|
||||
if (flags & X86_DUMP_CCOP) {
|
||||
if (flags & CPU_DUMP_CCOP) {
|
||||
if ((unsigned)env->cc_op < CC_OP_NB)
|
||||
snprintf(cc_op_name, sizeof(cc_op_name), "%s", cc_op_str[env->cc_op]);
|
||||
else
|
||||
|
@ -303,7 +303,7 @@ void cpu_dump_state(CPUX86State *env, FILE *f, fprintf_function cpu_fprintf,
|
|||
}
|
||||
}
|
||||
cpu_fprintf(f, "EFER=%016" PRIx64 "\n", env->efer);
|
||||
if (flags & X86_DUMP_FPU) {
|
||||
if (flags & CPU_DUMP_FPU) {
|
||||
int fptag;
|
||||
fptag = 0;
|
||||
for(i = 0; i < 8; i++) {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#ifdef DEBUG_PCALL
|
||||
# define LOG_PCALL(...) qemu_log_mask(CPU_LOG_PCALL, ## __VA_ARGS__)
|
||||
# define LOG_PCALL_STATE(env) \
|
||||
log_cpu_state_mask(CPU_LOG_PCALL, (env), X86_DUMP_CCOP)
|
||||
log_cpu_state_mask(CPU_LOG_PCALL, (env), CPU_DUMP_CCOP)
|
||||
#else
|
||||
# define LOG_PCALL(...) do { } while (0)
|
||||
# define LOG_PCALL_STATE(env) do { } while (0)
|
||||
|
@ -1177,7 +1177,7 @@ static void do_interrupt_all(CPUX86State *env, int intno, int is_int,
|
|||
qemu_log(" EAX=" TARGET_FMT_lx, EAX);
|
||||
}
|
||||
qemu_log("\n");
|
||||
log_cpu_state(env, X86_DUMP_CCOP);
|
||||
log_cpu_state(env, CPU_DUMP_CCOP);
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -47,7 +47,7 @@ void do_smm_enter(CPUX86State *env)
|
|||
int i, offset;
|
||||
|
||||
qemu_log_mask(CPU_LOG_INT, "SMM: enter\n");
|
||||
log_cpu_state_mask(CPU_LOG_INT, env, X86_DUMP_CCOP);
|
||||
log_cpu_state_mask(CPU_LOG_INT, env, CPU_DUMP_CCOP);
|
||||
|
||||
env->hflags |= HF_SMM_MASK;
|
||||
cpu_smm_update(env);
|
||||
|
@ -295,7 +295,7 @@ void helper_rsm(CPUX86State *env)
|
|||
cpu_smm_update(env);
|
||||
|
||||
qemu_log_mask(CPU_LOG_INT, "SMM: after RSM\n");
|
||||
log_cpu_state_mask(CPU_LOG_INT, env, X86_DUMP_CCOP);
|
||||
log_cpu_state_mask(CPU_LOG_INT, env, CPU_DUMP_CCOP);
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue