Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DYqt3-00089x-3o for qemu-devel@nongnu.org; Thu, 19 May 2005 15:40:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DYqt1-00088c-Ui for qemu-devel@nongnu.org; Thu, 19 May 2005 15:40:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DYqt1-00087X-Eh for qemu-devel@nongnu.org; Thu, 19 May 2005 15:40:51 -0400 Received: from [65.254.53.84] (helo=smtp.astolat-it.co.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DYqyz-0002De-25 for qemu-devel@nongnu.org; Thu, 19 May 2005 15:47:01 -0400 Received: from [192.168.6.2] (host86-129-204-220.range86-129.btcentralplus.com [86.129.204.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.astolat-it.co.uk (Postfix) with ESMTP id 15BFC12D2283 for ; Thu, 19 May 2005 19:38:25 +0000 (GMT) Message-ID: <428CEB32.6080804@astolat-it.co.uk> Date: Thu, 19 May 2005 20:38:26 +0100 From: Tim Walker MIME-Version: 1.0 Subject: Re: [Qemu-devel] [patch] gcc4 host support References: <200505191644.54916.paul@codesourcery.com> <200505191952.48028.paul@codesourcery.com> In-Reply-To: <200505191952.48028.paul@codesourcery.com> Content-Type: multipart/alternative; boundary="------------020009030109090309000209" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------020009030109090309000209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Paul Brook wrote: >On Thursday 19 May 2005 19:14, Thomas Steffen wrote: > > >>On 5/19/05, Paul Brook wrote: >> >> >>>I don't think GNU lightning really gains us much. We'd still have to do >>>the hard bits (optimization, register allocation, assigning stack slots, >>>etc). The actual native code generation (which is what lightning gives >>>you) is only a few hundred lines of code. >>> >>> >>I have the feeling that will apply to most alternatives. The problem >>is to turn the C code into machine code, right? That is a difficult >>problem, which is why a C compiler is a complex piece of software. >>Using a different tool is not going to turn it into a simple problem. >> >> > >No. The problem is to turn machine code into (a different form of) machine >code. A lot of the complexity in a compiler is involved with with turning the >high-level language constructs into simple low-level machine operations. > >With qemu we're just translating from one simple form to another, so I'd argue >that all you really need is a clever way of papering over the differences >between the host and the guest. > >What we have now (dyngen) is basically just an assembler. It maps qemu micro >ops directly into blocks host code. The only reason dyngen uses gcc is to >avoid having to hand write host encodings for all the ops. > >Paul > > >_______________________________________________ >Qemu-devel mailing list >Qemu-devel@nongnu.org >http://lists.nongnu.org/mailman/listinfo/qemu-devel > > > Pardon me for butting in, is any of the host encoding hand written? Tim --------------020009030109090309000209 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Paul Brook wrote:
On Thursday 19 May 2005 19:14, Thomas Steffen wrote:
  
On 5/19/05, Paul Brook <paul@codesourcery.com> wrote:
    
I don't think GNU lightning really gains us much. We'd still have to do
the hard bits (optimization, register allocation, assigning stack slots,
etc). The actual native code generation (which is what lightning gives
you) is only a few hundred lines of code.
      
I have the feeling that will apply to most alternatives. The problem
is to turn the C code into machine code, right? That is a difficult
problem, which is why a C compiler is a complex piece of software.
Using a different tool is not going to turn it into a simple problem.
    

No. The problem is to turn machine code into (a different form of) machine 
code. A lot of the complexity in a compiler is involved with with turning the 
high-level language constructs into simple low-level machine operations.

With qemu we're just translating from one simple form to another, so I'd argue 
that all you really need is a clever way of papering over the differences 
between the host and the guest.

What we have now (dyngen) is basically just an assembler. It maps qemu micro 
ops directly into blocks host code. The only reason dyngen uses gcc is to 
avoid having to hand write host encodings for all the ops. 

Paul


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

  
Pardon me for butting in, is any of the host encoding hand written?

Tim
--------------020009030109090309000209--