Revision 20503968 target-ppc/op_helper.c
b/target-ppc/op_helper.c | ||
---|---|---|
3715 | 3715 |
from generated code or from helper.c) */ |
3716 | 3716 |
/* XXX: fix it to restore all registers */ |
3717 | 3717 |
void tlb_fill(CPUPPCState *env1, target_ulong addr, int is_write, int mmu_idx, |
3718 |
void *retaddr)
|
|
3718 |
uintptr_t retaddr)
|
|
3719 | 3719 |
{ |
3720 | 3720 |
TranslationBlock *tb; |
3721 | 3721 |
CPUPPCState *saved_env; |
3722 |
unsigned long pc; |
|
3723 | 3722 |
int ret; |
3724 | 3723 |
|
3725 | 3724 |
saved_env = env; |
... | ... | |
3728 | 3727 |
if (unlikely(ret != 0)) { |
3729 | 3728 |
if (likely(retaddr)) { |
3730 | 3729 |
/* now we have a real cpu fault */ |
3731 |
pc = (unsigned long)retaddr; |
|
3732 |
tb = tb_find_pc(pc); |
|
3730 |
tb = tb_find_pc(retaddr); |
|
3733 | 3731 |
if (likely(tb)) { |
3734 | 3732 |
/* the PC is inside the translated code. It means that we have |
3735 | 3733 |
a virtual CPU fault */ |
3736 |
cpu_restore_state(tb, env, pc);
|
|
3734 |
cpu_restore_state(tb, env, retaddr);
|
|
3737 | 3735 |
} |
3738 | 3736 |
} |
3739 | 3737 |
helper_raise_exception_err(env->exception_index, env->error_code); |
Also available in: Unified diff