Alan Cox wrote:

>You only need enough code to load the x86 ld.so and run it.

Doh.  Of course, this makes it much easier, you basically
need only the equivalent of binfmt_elf.

>That one is actually doable within limits very cheaply indeed. When you
>generate the virtual instruction sequence you give each instruction a
>set of flag bits it must set properly. When you set the bits on a new
>instruction you clear them on the previous one which set it up unless
>they were actually used. jump instructions "use" all flags.

That's a start, but it still won't allow to JIT an x86 'compare +
conditional branch' sequence to the corresponding s390 one, which
is what you'd really like to have ...  But maybe this is not so
important.

>I'm not sure how critical a lot of that is since the code is really
>being translated into the new virtual machine and then jitted from that
>rather than just modifying the original code.

The problem is that the semantics of the VM are identical to x86
semantics (i.e. the ADD ucode op sets just the same flag bits as
the x86 ADD instruction).  That's the shortcuts you can take as
long as you stay on the same platform ...


Bye,
Ulrich

--
  Dr. Ulrich Weigand
  [EMAIL PROTECTED]

Reply via email to