181 |
|
case 0: // EMUL_RETURN |
182 |
|
QuitEmulator(); |
183 |
|
break; |
184 |
< |
|
184 |
> |
|
185 |
|
case 1: // EXEC_RETURN |
186 |
|
throw sheepshaver_exec_return(); |
187 |
|
break; |
294 |
|
gpr(8) = 0; |
295 |
|
gpr(10) = (uint32)trampoline; |
296 |
|
gpr(12) = (uint32)trampoline; |
297 |
< |
gpr(13) = cr().get(); |
297 |
> |
gpr(13) = get_cr(); |
298 |
|
|
299 |
|
// rlwimi. r7,r7,8,0,0 |
300 |
|
uint32 result = op_ppc_rlwimi::apply(gpr(7), 8, 0x80000000, gpr(7)); |
302 |
|
gpr(7) = result; |
303 |
|
|
304 |
|
gpr(11) = 0xf072; // MSR (SRR1) |
305 |
< |
cr().set((gpr(11) & 0x0fff0000) | (cr().get() & ~0x0fff0000)); |
305 |
> |
cr().set((gpr(11) & 0x0fff0000) | (get_cr() & ~0x0fff0000)); |
306 |
|
|
307 |
|
// Enter nanokernel |
308 |
|
execute(entry); |
328 |
|
uint32 saved_pc = pc(); |
329 |
|
uint32 saved_lr = lr(); |
330 |
|
uint32 saved_ctr= ctr(); |
331 |
+ |
uint32 saved_cr = get_cr(); |
332 |
|
|
333 |
|
// Create MacOS stack frame |
334 |
|
// FIXME: make sure MacOS doesn't expect PPC registers to live on top |
400 |
|
pc() = saved_pc; |
401 |
|
lr() = saved_lr; |
402 |
|
ctr()= saved_ctr; |
403 |
+ |
set_cr(saved_cr); |
404 |
|
} |
405 |
|
|
406 |
|
// Call MacOS PPC code |