> > I just spoke with Paul on IRC about this. In summary: > > * for a helper to cause an exception then it has (a) to make sure CPU > > > > state (pc, condflags) is sync'd before the call to the helper and (b) > > the helper has to be in a file with access to global env, because it > > needs to call cpu_loop_exit() > > I don't think (a) is true. It is possible to use the same way as for > load/store operations, that is call cpu_restore_state() before calling > cpu_loop_exit().
To call cpu_restore_state you need to know searched_pc. To find that you need to unwind the host stack all the way back to translated code. Paul