lightning
[Top][All Lists]
Advanced

[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: Tue, 20 Oct 2015 22:43:26 -0200

2015-10-20 20:31 GMT-02:00 Kaz Nishimura <address@hidden>:

  Hi,

> Of course, I will try to read ahead but not every instruction changes the
> condition code and the CPU is CISC so reading ahead up to any branch
> instruction may require not so simple two-pass decoding that I want to
> avoid.  In addition, the "guest" architecture has 16 hardware registers and
> I cannot map statically them to lightning registers.  I also want to avoid
> managing register reallocation if possible.

  Do you want to do a full computer system binary translation? If yes, it
is still possible with lightning, but you may have more luck, and possibly
even already done in qemu, e.g. see:
http://git.qemu.org/?p=qemu.git;a=tree;f=tcg
and unless I am mistaken, based on your email, it should be m68k :), see
git.qemu.org/?p=qemu.git;a=tree;f=target-m68k

  If only "user level" applications, lightning is a good option. I
would at first
suggest making simple tests, like just generating some code and
disassembling it. And forget about optimization in early stages. Just
translating to jit should provide a huge performance boost over an interpreter.

  This at least would give you a better idea of what lightning can do. I
suggest just taking a sample of code you want to translate, and generate
a simple parser, that just disassembles the jit, and does not execute it.

  For small amounts of code, you can write a simple script in the format
used by lightning tests. You would need to make a checkout of the source,
build it, and then write manually a simple translation. see the *.tst files
under http://git.savannah.gnu.org/cgit/lightning.git/tree/check/
If the script starts with ".disasm" it will just generate jit and
disassemble it.
The file http://git.savannah.gnu.org/cgit/lightning.git/tree/check/all.tst
is an example. It generates jit for almost all lightning interfaces, and
just disassembles it (useful in early stages of a new port).

Thanks,
Paulo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]