Received: from [140.186.70.92] (port=57744 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLlrD-00066x-Jp for qemu-devel@nongnu.org; Mon, 07 Jun 2010 19:35:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLlrC-00016X-CO for qemu-devel@nongnu.org; Mon, 07 Jun 2010 19:35:51 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55891 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLlrC-00016Q-51 for qemu-devel@nongnu.org; Mon, 07 Jun 2010 19:35:50 -0400 Subject: Re: [Qemu-devel] Getting tcg in a standalone library Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <201006072327.02238.peter.fritzsche@gmx.de> Date: Tue, 8 Jun 2010 01:35:47 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201006072327.02238.peter.fritzsche@gmx.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Fritzsche Cc: qemu-devel@nongnu.org On 07.06.2010, at 23:27, Peter Fritzsche wrote: > Hi, >=20 > I am currently quite interesting in tcg for binary translation. There = are many=20 > emulator projects (I mean mostly console emulators) out there which = start to=20 > implement more or less bad ILs to translate their specific cpu (for = example=20 > gameboy has z80, n64 has r4300i, gamecube has powerpc 750CXe, ...). = These are=20 > most of the time x86 only and very limited. But it seems that qemu's = cpu=20 > libraries aren't made for those cpu's and don't seem to provide the = needed=20 > infrastructure for emulating such highly integrated systems (please = correct me=20 > if I am wrong). The old stuff is pretty tough, as it's timing critical. Everything as of = the GC should be fairly easy to emulate using tcg though, as you can = just count the overall emulated instructions and throttle it lazily from = there. That's basically what Dolphin does too. For the 750CXe all that's left to do is to emulate the paired single = instructions. And I have a full emulation of those in the KVM code = already, so you could take it from there. > I think that the best way to share code would be if other projects = could also=20 > use tcg for their translation needs. But it seems to me that it it to = tightly=20 > integrated into qemu and cannot be ripped out. Are their any plans to = open it=20 > for other projects as you have already done it with the emulation = cores? Yes, I agree. That would indeed be useful. Patches are welcome. Alex