From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9gxb-0001DK-Nd for qemu-devel@nongnu.org; Wed, 15 Oct 2003 04:24:47 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9gx4-0000vC-NH for qemu-devel@nongnu.org; Wed, 15 Oct 2003 04:24:45 -0400 Received: from [199.201.128.19] (helo=beach.silcom.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9gx4-0000un-6B for qemu-devel@nongnu.org; Wed, 15 Oct 2003 04:24:14 -0400 Received: from beach.silcom.com (beach.silcom.com [199.201.128.19]) by beach.silcom.com (Postfix) with SMTP id 8E29C1452B6 for ; Wed, 15 Oct 2003 01:24:40 -0700 (PDT) Date: Wed, 15 Oct 2003 01:24:40 -0700 (PDT) From: Chad Page Subject: Re: [Qemu-devel] gcc as a backend to generate better code In-Reply-To: <3F8D02DC.90508@free.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Sounds interesting. Perhaps the off-line tool could be run directly from qemu to facilitate ease of use. Then to the end user it would appear to run faster each time you use it. Also if the off-line tool could successfully dissaemble enough of the program without running it, it could be precompiled before the first invocation. It might be too difficult to follow all code paths, though, but you'ld know that :) - Chad On Wed, 15 Oct 2003, Fabrice Bellard wrote: > 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. > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://mail.nongnu.org/mailman/listinfo/qemu-devel >