Jeff Clites <[EMAIL PROTECTED]> wrote:
> On Oct 14, 2004, at 12:10 PM, Leopold Toetsch wrote:

>> Proposal:
>> * we mandate that JIT code uses interpreter-relative addressing
>> - because almost all platforms do it
>> - because some platforms just can't do anything else
>> - and of course to avoid re-JITting for every new thread

> FYI, the PPC JIT does already do parrot register addressing relative to
> the interpreter pointer, which as you said is already in a CPU
> register. This is actually less instructions than using absolute
> addressing would require (one rather than three).

Yes, and not only PPC, *all* but i386.

> We do still re-JIT for each thread on PPC, though we wouldn't have to
> (just never changed it to not).

Doing that or not depending on a specific JIT platform is error prone
and clutters the source code.

> ... But, we use this currently, because
> there is one issue with threads: With a thread, you don't start from
> the "beginning" of the JITted code segment,

This isn't a threading issue. We can always start execution in the
middle of one segment, e.g. after an exception. That's already handled
on almost all JIT platforms and no problem. The code emitted in
Parrot_jit_begin gets the C<cur_opcode *> as argument and has to branch
there, always.

> JEff

leo

Reply via email to