Alan Cox wrote: >Which is why I was looking at the valgrind instruction decode and JIT >engine, because with the verification/debug stuff removed the basic >encode/jit engine is extremely clean and has few instructions to >implement for a full x86 user space.
Indeed. It still won't be trivial I guess; even on first glance I can see a couple of iffy issues: - Getting up and running. The 'let's start JITing the return from a constructor all through ld.so' is cute, but won't work cross-platform. We'll need a real cross-ELF loader. - EFlags. Those are always a bitch to emulate, and the S/390 notion of condition code is not quite a close match to x86 flags ... Complete synthesis of flags for every instruction would increase costs by about an order of magnitude; so we'll have to optimize by some sort of data-flow analysis (which bits are actually used?). - FPU instructions. Those won't be completely compatible in rounding and corner case behaviour; does it matter? 80-bit mode is tough. Exact emulation in software is really slow ... - Cross-platform syscall translation. Not difficult, but tedious. I'm sure I could find more problems on a closer look ;-) Bye, Ulrich -- Dr. Ulrich Weigand [EMAIL PROTECTED]
