Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> ... Switching the whole op_func_table() or
> ops_addr[] (for CG cores) is simpler,

If have it running now for the slow and the computed goto core.
The signal handler (interrupt code) switches the op_func_table (ops_addr)
and returns.
Then the next executed instructions is the real event handler, which
restores the op_func_table and then does something appropriate with the
event.

But there is a problem with the prederefed cores. They do now something
like:

  PC = ((op_func_t*) (*PC)) (PC, INTERP); // prederef functions

To be able to switch function tables, this then should become:

  PC = ((op_func_t*) (func_table + *PC)) (PC, INTERP);

Thus predereferncing the function pointer would place an offset into the
function table, not an absolute address.

Or is there a better way to do it?

leo

Reply via email to