228 |
struct ppc32_insn_tag *tag = NULL; |
struct ppc32_insn_tag *tag = NULL; |
229 |
int index; |
int index; |
230 |
|
|
231 |
index = ilt_lookup(ilt,ins); |
index = ilt_lookup(ilt,ins); |
232 |
tag = ppc32_jit_get_insn(index); |
tag = ppc32_jit_get_insn(index); |
233 |
return tag; |
return tag; |
234 |
} |
} |
1053 |
if (ppc32_jit_tcb_get_target_bit(b,cur_ia)) |
if (ppc32_jit_tcb_get_target_bit(b,cur_ia)) |
1054 |
ppc32_op_emit_basic_opcode(cpu,JIT_OP_BRANCH_TARGET); |
ppc32_op_emit_basic_opcode(cpu,JIT_OP_BRANCH_TARGET); |
1055 |
|
|
1056 |
|
#if DEBUG_INSN_PERF_CNT |
1057 |
|
ppc32_inc_perf_counter(cpu); |
1058 |
|
#endif |
1059 |
|
#if BREAKPOINT_ENABLE |
1060 |
|
if (cpu->breakpoints_enabled) |
1061 |
|
insn_emit_breakpoint(cpu,b); |
1062 |
|
#endif |
1063 |
|
|
1064 |
if (unlikely(!(tag = ppc32_jit_fetch_and_emit(cpu,b)))) { |
if (unlikely(!(tag = ppc32_jit_fetch_and_emit(cpu,b)))) { |
1065 |
fprintf(stderr,"ppc32_op_gen_page: unable to fetch instruction.\n"); |
fprintf(stderr,"ppc32_op_gen_page: unable to fetch instruction.\n"); |
1066 |
return(-1); |
return(-1); |
1082 |
{ |
{ |
1083 |
jit_ptr = b->jit_ptr; |
jit_ptr = b->jit_ptr; |
1084 |
|
|
|
#if DEBUG_INSN_PERF_CNT |
|
|
ppc32_inc_perf_counter(b); |
|
|
#endif |
|
|
#if BREAKPOINT_ENABLE |
|
|
if (cpu->breakpoints_enabled) |
|
|
insn_emit_breakpoint(cpu,b); |
|
|
#endif |
|
|
|
|
1085 |
/* Generate output code */ |
/* Generate output code */ |
1086 |
ppc32_op_gen_list(b,i,gcpu->jit_op_array[i],jit_ptr); |
ppc32_op_gen_list(b,i,gcpu->jit_op_array[i],jit_ptr); |
1087 |
|
|
1191 |
} |
} |
1192 |
|
|
1193 |
/* Run a compiled PowerPC instruction block */ |
/* Run a compiled PowerPC instruction block */ |
1194 |
static forced_inline |
static forced_inline |
1195 |
void ppc32_jit_tcb_run(cpu_ppc_t *cpu,ppc32_jit_tcb_t *block) |
void ppc32_jit_tcb_run(cpu_ppc_t *cpu,ppc32_jit_tcb_t *block) |
1196 |
{ |
{ |
1197 |
if (unlikely(cpu->ia & 0x03)) { |
if (unlikely(cpu->ia & 0x03)) { |
1227 |
} |
} |
1228 |
|
|
1229 |
gen->cpu_thread_running = TRUE; |
gen->cpu_thread_running = TRUE; |
1230 |
|
cpu_exec_loop_set(gen); |
1231 |
|
|
1232 |
start_cpu: |
start_cpu: |
1233 |
gen->idle_count = 0; |
gen->idle_count = 0; |