Revision 93fcfe39 target-mips/translate.c
b/target-mips/translate.c | ||
---|---|---|
514 | 514 |
"h24", "h25", "h26", "h27", "h28", "h29", "h30", "h31", }; |
515 | 515 |
|
516 | 516 |
#ifdef MIPS_DEBUG_DISAS |
517 |
#define MIPS_DEBUG(fmt, args...) \ |
|
518 |
do { \ |
|
519 |
if (loglevel & CPU_LOG_TB_IN_ASM) { \ |
|
520 |
fprintf(logfile, TARGET_FMT_lx ": %08x " fmt "\n", \ |
|
521 |
ctx->pc, ctx->opcode , ##args); \ |
|
522 |
} \ |
|
523 |
} while (0) |
|
524 |
#define LOG_DISAS(...) \ |
|
525 |
do { \ |
|
526 |
if (loglevel & CPU_LOG_TB_IN_ASM) \ |
|
527 |
fprintf(logfile, ## __VA_ARGS__); \ |
|
528 |
} while (0) |
|
517 |
#define MIPS_DEBUG(fmt, args...) \ |
|
518 |
qemu_log_mask(CPU_LOG_TB_IN_ASM, \ |
|
519 |
TARGET_FMT_lx ": %08x " fmt "\n", \ |
|
520 |
ctx->pc, ctx->opcode , ##args) |
|
521 |
#define LOG_DISAS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__) |
|
529 | 522 |
#else |
530 | 523 |
#define MIPS_DEBUG(fmt, args...) do { } while(0) |
531 | 524 |
#define LOG_DISAS(...) do { } while (0) |
... | ... | |
8180 | 8173 |
int num_insns; |
8181 | 8174 |
int max_insns; |
8182 | 8175 |
|
8183 |
if (search_pc && loglevel)
|
|
8184 |
fprintf (logfile, "search pc %d\n", search_pc);
|
|
8176 |
if (search_pc) |
|
8177 |
qemu_log("search pc %d\n", search_pc);
|
|
8185 | 8178 |
|
8186 | 8179 |
pc_start = tb->pc; |
8187 | 8180 |
/* Leave some spare opc slots for branch handling. */ |
... | ... | |
8203 | 8196 |
if (max_insns == 0) |
8204 | 8197 |
max_insns = CF_COUNT_MASK; |
8205 | 8198 |
#ifdef DEBUG_DISAS |
8206 |
if (loglevel & CPU_LOG_TB_CPU) { |
|
8207 |
fprintf(logfile, "------------------------------------------------\n"); |
|
8208 |
/* FIXME: This may print out stale hflags from env... */ |
|
8209 |
cpu_dump_state(env, logfile, fprintf, 0); |
|
8210 |
} |
|
8199 |
qemu_log_mask(CPU_LOG_TB_CPU, "------------------------------------------------\n"); |
|
8200 |
/* FIXME: This may print out stale hflags from env... */ |
|
8201 |
log_cpu_state_mask(CPU_LOG_TB_CPU, env, 0); |
|
8211 | 8202 |
#endif |
8212 | 8203 |
LOG_DISAS("\ntb %p idx %d hflags %04x\n", tb, ctx.mem_idx, ctx.hflags); |
8213 | 8204 |
gen_icount_start(); |
... | ... | |
8299 | 8290 |
#ifdef DEBUG_DISAS |
8300 | 8291 |
LOG_DISAS("\n"); |
8301 | 8292 |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
8302 |
fprintf(logfile, "IN: %s\n", lookup_symbol(pc_start)); |
|
8303 |
target_disas(logfile, pc_start, ctx.pc - pc_start, 0); |
|
8304 |
fprintf(logfile, "\n"); |
|
8305 |
} |
|
8306 |
if (loglevel & CPU_LOG_TB_CPU) { |
|
8307 |
fprintf(logfile, "---------------- %d %08x\n", ctx.bstate, ctx.hflags); |
|
8293 |
qemu_log("IN: %s\n", lookup_symbol(pc_start)); |
|
8294 |
log_target_disas(pc_start, ctx.pc - pc_start, 0); |
|
8295 |
qemu_log("\n"); |
|
8308 | 8296 |
} |
8297 |
qemu_log_mask(CPU_LOG_TB_CPU, "---------------- %d %08x\n", ctx.bstate, ctx.hflags); |
|
8309 | 8298 |
#endif |
8310 | 8299 |
} |
8311 | 8300 |
|
Also available in: Unified diff