145 |
return(res); |
return(res); |
146 |
} |
} |
147 |
|
|
148 |
|
/* Execute a page */ |
149 |
|
fastcall int ppc32_exec_page(cpu_ppc_t *cpu) |
150 |
|
{ |
151 |
|
m_uint32_t exec_page,offset; |
152 |
|
ppc_insn_t insn; |
153 |
|
int res; |
154 |
|
|
155 |
|
exec_page = cpu->ia & ~PPC32_MIN_PAGE_IMASK; |
156 |
|
cpu->njm_exec_page = exec_page; |
157 |
|
cpu->njm_exec_ptr = cpu->mem_op_lookup(cpu,exec_page,PPC32_MTS_ICACHE); |
158 |
|
|
159 |
|
do { |
160 |
|
offset = (cpu->ia & PPC32_MIN_PAGE_IMASK) >> 2; |
161 |
|
insn = vmtoh32(cpu->njm_exec_ptr[offset]); |
162 |
|
|
163 |
|
res = ppc32_exec_single_instruction(cpu,insn); |
164 |
|
if (likely(!res)) cpu->ia += sizeof(ppc_insn_t); |
165 |
|
}while((cpu->ia & ~PPC32_MIN_PAGE_IMASK) == exec_page); |
166 |
|
|
167 |
|
return(0); |
168 |
|
} |
169 |
|
|
170 |
/* Run PowerPC code in step-by-step mode */ |
/* Run PowerPC code in step-by-step mode */ |
171 |
void *ppc32_exec_run_cpu(cpu_gen_t *gen) |
void *ppc32_exec_run_cpu(cpu_gen_t *gen) |
172 |
{ |
{ |