Revision d12d51d5 target-ppc/translate.c
b/target-ppc/translate.c | ||
---|---|---|
42 | 42 |
//#define PPC_DEBUG_DISAS |
43 | 43 |
//#define DO_PPC_STATISTICS |
44 | 44 |
|
45 |
#ifdef PPC_DEBUG_DISAS |
|
46 |
# define LOG_DISAS(...) do { \ |
|
47 |
if (loglevel & CPU_LOG_TB_IN_ASM) \ |
|
48 |
fprintf(logfile, ## __VA_ARGS__); \ |
|
49 |
} while (0) |
|
50 |
#else |
|
51 |
# define LOG_DISAS(...) do { } while (0) |
|
52 |
#endif |
|
45 | 53 |
/*****************************************************************************/ |
46 | 54 |
/* Code translation helpers */ |
47 | 55 |
|
... | ... | |
8232 | 8240 |
gen_opc_icount[lj] = num_insns; |
8233 | 8241 |
} |
8234 | 8242 |
} |
8235 |
#if defined PPC_DEBUG_DISAS |
|
8236 |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
|
8237 |
fprintf(logfile, "----------------\n"); |
|
8238 |
fprintf(logfile, "nip=" ADDRX " super=%d ir=%d\n", |
|
8239 |
ctx.nip, ctx.mem_idx, (int)msr_ir); |
|
8240 |
} |
|
8241 |
#endif |
|
8243 |
LOG_DISAS("----------------\n"); |
|
8244 |
LOG_DISAS("nip=" ADDRX " super=%d ir=%d\n", |
|
8245 |
ctx.nip, ctx.mem_idx, (int)msr_ir); |
|
8242 | 8246 |
if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) |
8243 | 8247 |
gen_io_start(); |
8244 | 8248 |
if (unlikely(ctx.le_mode)) { |
... | ... | |
8246 | 8250 |
} else { |
8247 | 8251 |
ctx.opcode = ldl_code(ctx.nip); |
8248 | 8252 |
} |
8249 |
#if defined PPC_DEBUG_DISAS |
|
8250 |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
|
8251 |
fprintf(logfile, "translate opcode %08x (%02x %02x %02x) (%s)\n", |
|
8253 |
LOG_DISAS("translate opcode %08x (%02x %02x %02x) (%s)\n", |
|
8252 | 8254 |
ctx.opcode, opc1(ctx.opcode), opc2(ctx.opcode), |
8253 | 8255 |
opc3(ctx.opcode), little_endian ? "little" : "big"); |
8254 |
} |
|
8255 |
#endif |
|
8256 | 8256 |
ctx.nip += 4; |
8257 | 8257 |
table = env->opcodes; |
8258 | 8258 |
num_insns++; |
Also available in: Unified diff