Skip to contentSkip to conversation

How difficult to strip this down?

Qemu-devel Bradon Kanyid 3 participants 3 messages Jul 15, 2003 – Jul 16, 2003

lore
Share & tools
lore
#0 lore raw

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

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

#1 lore raw
Quoted 15 lines · 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

maybe you should also have a look at bintrans a dynamic binary translator which uses a generalized machine description to go from one architecture to the other ...

although it does not support arm yet, it is easy to adapt/extend and very fast ...

best,
Herbert

#2 lore raw
In reply to Bradon Kanyid

Quoting Bradon Kanyid <[email protected]>:

Quoted 13 lines

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

Quoted 5 lines

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.