qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] gcc as a backend to generate better code


From: Fabrice Bellard
Subject: Re: [Qemu-devel] gcc as a backend to generate better code
Date: Wed, 15 Oct 2003 10:18:36 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020828

Johan Rydberg wrote:
The TODO file states the following:

- use gcc as a backend to generate better code (easy to do by using
  op-i386.c operations as local inline functions).

How would this be done, actually?

The executable is launched at least once with the standard QEMU to record translation block statistics, location and code reference (from which file it comes, at which offset).

Then an off-line tool is launched to convert recorded translation blocks to a .so file using gcc by generating C code from each micro operation.

When QEMU is launched again, it can scan a directory containing .so files for all statically compiled programs. Then it can load the corresponding .so file and use the translated blocks stored inside.

With this method, only heavily used translations blocks are compiled with gcc. The rest is translated with QEMU.

Fabrice.





reply via email to

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