--- upstream/dynamips-0.2.7-RC3/ppc32_jit.c 2007/10/06 16:26:06 9 +++ trunk/ppc32_jit.c 2007/10/06 16:45:40 12 @@ -228,7 +228,7 @@ struct ppc32_insn_tag *tag = NULL; int index; - index = ilt_lookup(ilt,ins); + index = ilt_lookup(ilt,ins); tag = ppc32_jit_get_insn(index); return tag; } @@ -1053,6 +1053,14 @@ if (ppc32_jit_tcb_get_target_bit(b,cur_ia)) ppc32_op_emit_basic_opcode(cpu,JIT_OP_BRANCH_TARGET); +#if DEBUG_INSN_PERF_CNT + ppc32_inc_perf_counter(cpu); +#endif +#if BREAKPOINT_ENABLE + if (cpu->breakpoints_enabled) + insn_emit_breakpoint(cpu,b); +#endif + if (unlikely(!(tag = ppc32_jit_fetch_and_emit(cpu,b)))) { fprintf(stderr,"ppc32_op_gen_page: unable to fetch instruction.\n"); return(-1); @@ -1074,14 +1082,6 @@ { jit_ptr = b->jit_ptr; -#if DEBUG_INSN_PERF_CNT - ppc32_inc_perf_counter(b); -#endif -#if BREAKPOINT_ENABLE - if (cpu->breakpoints_enabled) - insn_emit_breakpoint(cpu,b); -#endif - /* Generate output code */ ppc32_op_gen_list(b,i,gcpu->jit_op_array[i],jit_ptr); @@ -1191,7 +1191,7 @@ } /* Run a compiled PowerPC instruction block */ -static forced_inline +static forced_inline void ppc32_jit_tcb_run(cpu_ppc_t *cpu,ppc32_jit_tcb_t *block) { if (unlikely(cpu->ia & 0x03)) { @@ -1227,6 +1227,7 @@ } gen->cpu_thread_running = TRUE; + cpu_exec_loop_set(gen); start_cpu: gen->idle_count = 0;