[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lightning] JIT binary translation using lightning possible?
From: |
Paulo César Pereira de Andrade |
Subject: |
Re: [Lightning] JIT binary translation using lightning possible? |
Date: |
Wed, 21 Oct 2015 11:47:27 -0200 |
2015-10-20 23:45 GMT-02:00 Kaz Nishimura <address@hidden>:
Hi,
> Your guess is mostly correct. I am trying to make an application-level
> emulator on a specific m68k-based machine. The system services will be
> implemented in native code in C++. I had wrote a direct interpreting
> emulator in the past but it was done when real CPU clocks were about 100
> MHz, so I am trying to rewrite it in a more object-oriented way.
>
> Since host CPUs have been more than 10 times faster now, even direct
> interpretation will be fast enough IMO. So I think JIT translation as an
> additional performance boost and want to keep the binary translator as
> simple as possible because the largest performance bottleneck will be
> peripheral device emulation. The key factors in the binary translator are
> simplicity in using the JIT code generator and portability on my plan. That
> is why I waver between several JIT implementations.
Ok :)
Lightning interface is very simple, but my work on it, after becoming
maintainer, is targeting it to be a jit for method based, dynamically typed
languages. You can see an example, not very active lately, of a C/C++
dynamically typed language using lightning at https://github.com/pcpa/owl/
see the lib/oemit*c files for the actual jit translation.
Lightning does not have some operations that would be desirable for
a binary translator, that is, 32 bit operations on a 64 bit build, or, 64
bit operations on a 32 bit build. So, it may be required to be "creative"
with some operations if generating jit to emulate a 32 bit system on a
64 bit computer.
For binary translation, a tracing jit could be better. But then you would
need to likely have both, an interpreter and a jit generator.
Depending on the size of the binaries, you may even be able to fully
translate it to jit. On modern cpus, I "guesstimate" one could generate
up to 1Gb native code in 1 sec, as long as it is a simple direct translation
and everything is already in memory.
Thanks,
Paulo
- [Lightning] JIT binary translation using lightning possible?, Kaz Nishimura, 2015/10/19
- Re: [Lightning] JIT binary translation using lightning possible?, Paulo César Pereira de Andrade, 2015/10/19
- Re: [Lightning] JIT binary translation using lightning possible?, Kaz Nishimura, 2015/10/20
- Re: [Lightning] JIT binary translation using lightning possible?, Paulo César Pereira de Andrade, 2015/10/20
- Re: [Lightning] JIT binary translation using lightning possible?, Kaz Nishimura, 2015/10/20
- Re: [Lightning] JIT binary translation using lightning possible?, Paulo César Pereira de Andrade, 2015/10/20
- Re: [Lightning] JIT binary translation using lightning possible?, Kaz Nishimura, 2015/10/20
- Re: [Lightning] JIT binary translation using lightning possible?,
Paulo César Pereira de Andrade <=
- Re: [Lightning] JIT binary translation using lightning possible?, Kaz Nishimura, 2015/10/21