Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19chH7-0004Lo-On for qemu-devel@nongnu.org; Wed, 16 Jul 2003 04:04:33 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19chH6-0004Ld-9K for qemu-devel@nongnu.org; Wed, 16 Jul 2003 04:04:32 -0400 Received: from postfix4-2.free.fr ([213.228.0.176]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19chH6-0004LU-0t for qemu-devel@nongnu.org; Wed, 16 Jul 2003 04:04:32 -0400 Received: from impt3-1.proxad.net (impt3-1.free.fr [213.228.0.81]) by postfix4-2.free.fr (Postfix) with ESMTP id 3E03FC131 for ; Wed, 16 Jul 2003 10:04:31 +0200 (CEST) Message-ID: <1058342670.3f15070eeb06d@impt3-1.free.fr> Date: Wed, 16 Jul 2003 10:04:30 +0200 From: fabrice.bellard@free.fr Subject: Re: [Qemu-devel] How difficult to strip this down? References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Quoting Bradon Kanyid : > Hi, > > I was wondering about how difficult it would be to strip down the cpu > emulation to a simpler form? I need a x86 emulator that will work on an > ARM9, but I don't need a lot of the extras that are included in your source. > > Really, I only need 80186 cpu emulation, and very little else. I was > wondering if hacking out all the rest would be easy, or is this just a waste > > of my time? Also, you didn't post any benchmarks for the ARM with your > recent benchmarks. My current emulation is probably about 20 arm > instructions to 1 x86 instruction (I'm using a crappy MAME cpu core), and it > > appears for other cpus like the PPC that you get a 10-1 ratio. If I could > get something like that, that'd be great. Anyways, this project looks great, > > and I'd like to be able to use it, but if it's something totally different > from what I'm looking for, I'd like to know before I waste my time. Thanks With QEMU/arm, it should be possible to be even faster if you handle unaligned accesses with a trap (it is not done currently in QEMU as I was not permitted to change the unaligned access mode on the host I was using). Of course you get a slowdown if the code does too many unaligned accesses. I don't think it is worth stripping the emulation to a simpler form : the code is already quite small. Did you try using libqemu.a as is ? A patch you may need is the handling of real mode (QEMU only handles protected and vm86 modes yet, but real mode would be very easy to add). Fabrice.