--- upstream/dynamips-0.2.7-RC2/ppc32_x86_trans.h 2007/10/06 16:24:54 8 +++ upstream/dynamips-0.2.7-RC3/ppc32_x86_trans.h 2007/10/06 16:26:06 9 @@ -33,9 +33,9 @@ extern struct ppc32_insn_tag ppc32_insn_tags[]; /* Push epilog for an x86 instruction block */ -static forced_inline void ppc32_jit_tcb_push_epilog(ppc32_jit_tcb_t *block) +static forced_inline void ppc32_jit_tcb_push_epilog(u_char **ptr) { - x86_ret(block->jit_ptr); + x86_ret(*ptr); } /* Execute JIT code */ @@ -48,25 +48,21 @@ offset = (cpu->ia & PPC32_MIN_PAGE_IMASK) >> 2; jit_code = (insn_tblock_fptr)block->jit_insn_ptr[offset]; -#if 0 if (unlikely(!jit_code)) { - ppc32_exec_single_step(cpu,vmtoh32(block->ppc_code[offset])); - return; + ppc32_jit_tcb_set_target_bit(block,cpu->ia); + + if (++block->target_undef_cnt == 16) { + ppc32_jit_tcb_recompile(cpu,block); + jit_code = (insn_tblock_fptr)block->jit_insn_ptr[offset]; + } else { + ppc32_exec_page(cpu); + return; + } } -#endif asm volatile ("movl %0,%%edi"::"r"(cpu): "esi","edi","eax","ebx","ecx","edx"); jit_code(); } -/* Set the Instruction Address (IA) register */ -void ppc32_set_ia(ppc32_jit_tcb_t *b,m_uint32_t new_ia); - -/* Set the Link Register (LR) */ -void ppc32_set_lr(ppc32_jit_tcb_t *b,m_uint32_t new_lr); - -/* Increment the number of executed instructions (performance debugging) */ -void ppc32_inc_perf_counter(ppc32_jit_tcb_t *b); - #endif