131 |
/* internal defines */ |
/* internal defines */ |
132 |
typedef struct DisasContext { |
typedef struct DisasContext { |
133 |
struct TranslationBlock *tb; |
struct TranslationBlock *tb; |
134 |
uint32_t nip; |
target_ulong nip; |
135 |
uint32_t opcode; |
uint32_t opcode; |
136 |
uint32_t exception; |
uint32_t exception; |
137 |
/* Execution mode */ |
/* Execution mode */ |
3029 |
{ |
{ |
3030 |
DisasContext ctx, *ctxp = &ctx; |
DisasContext ctx, *ctxp = &ctx; |
3031 |
opc_handler_t **table, *handler; |
opc_handler_t **table, *handler; |
3032 |
uint32_t pc_start; |
target_ulong pc_start; |
3033 |
uint16_t *gen_opc_end; |
uint16_t *gen_opc_end; |
3034 |
int j, lj = -1; |
int j, lj = -1; |
3035 |
|
|
3069 |
ctx.nip, 1 - msr_pr, msr_ir); |
ctx.nip, 1 - msr_pr, msr_ir); |
3070 |
} |
} |
3071 |
#endif |
#endif |
3072 |
ctx.opcode = ldl_code((void *)ctx.nip); |
ctx.opcode = ldl_code(ctx.nip); |
3073 |
#if defined PPC_DEBUG_DISAS |
#if defined PPC_DEBUG_DISAS |
3074 |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
3075 |
fprintf(logfile, "translate opcode %08x (%02x %02x %02x)\n", |
fprintf(logfile, "translate opcode %08x (%02x %02x %02x)\n", |
3174 |
cpu_dump_state(env, logfile, fprintf, 0); |
cpu_dump_state(env, logfile, fprintf, 0); |
3175 |
} |
} |
3176 |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
if (loglevel & CPU_LOG_TB_IN_ASM) { |
3177 |
fprintf(logfile, "IN: %s\n", lookup_symbol((void *)pc_start)); |
fprintf(logfile, "IN: %s\n", lookup_symbol(pc_start)); |
3178 |
disas(logfile, (void *)pc_start, ctx.nip - pc_start, 0, 0); |
target_disas(logfile, pc_start, ctx.nip - pc_start, 0); |
3179 |
fprintf(logfile, "\n"); |
fprintf(logfile, "\n"); |
3180 |
} |
} |
3181 |
if (loglevel & CPU_LOG_TB_OP) { |
if (loglevel & CPU_LOG_TB_OP) { |