At 10:37 PM 9/17/2001 +0100, Simon Cozens wrote:
>On Sun, Sep 16, 2001 at 01:03:17PM -0500, Brian Wheeler wrote:
> > Its not going to work, if I understand it correctly. I tried doing it
> > (even set up the symbol '*' to mean the current PC) and do it, but it
> > seems the ops take a relative offset. Take jump_i, for example:
> >
> > /* JUMP Ix */
> > MANUAL_OP jump_i {
> > RETURN(INT_REG(P1));
> > }
>
> > IV *jump_i(IV cur_opcode[], struct Parrot_Interp *interpreter) {
> > IV return_offset = 1;
> > return cur_opcode + INT_REG(cur_opcode[1]);
> > return cur_opcode + return_offset;
> > }
>
>I'm pretty sure that's a bug. jump should
> return INT_REG(cur_opcode[1]);
>
>That's to say, it should be an absolute address. (If I'm reading
>the documentation correctly.)
It means the integer register should have an absolute address in it. Where
that address comes from is another matter entirely...
>Which is really going to screw up backpatching. :(
Maybe. I don't think it's as big a deal as you might think it is, since we
vector through a register, and you can just patch the register load. (And
most register loads will be from looking routines up by name in the stash/pad)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk