Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Why processor emulation is slow?
« previous next »
  • Print
Pages: [1]

Author Topic: Why processor emulation is slow?  (Read 1253 times)

Offline greatjack

  • Member
  • *
  • Posts: 26
Why processor emulation is slow?
« on: April 05, 2017, 12:40:57 PM »
I understand that this question doesnt have a direct connection to rockbox, but I figured that I will ask it here anyway, since the rockbox community has many professionals who would likely know the answer.

The question is why is processor emulation so slow, for example emulating arm on x86, if all processors have the same basic operations just that they are implemented with different assembler functions, why cant we just map the assembler functions. for example map the x86 addition function to the arm addition function and so forth, wouldnt this be fast and not cause slow down thats found in most arm to x86 emulators?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Why processor emulation is slow?
« Reply #1 on: April 05, 2017, 12:44:29 PM »
Quote from: greatjack on April 05, 2017, 12:40:57 PM
The question is why is processor emulation so slow, for example emulating arm on x86, if all processors have the same basic operations just that they are implemented with different assembler functions, why cant we just map the assembler functions.

When we say that they are different processor families, what we mean is that the underlying assembly instructions do different things.  Because they do different things, many native instructions will be needed to implement each of the emulated instructions.  If it takes on average 10 native instructions to implement each emulated instruction, then the emulating machine must be 10 times faster than the emulated machine to run it at full speed. 
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 390
Re: Why processor emulation is slow?
« Reply #2 on: April 05, 2017, 02:13:28 PM »
In fact emulating just core is easy. Emulating I/O is expensive. Not speaking of interrupts, caches etc.

BTW. What you are proposing i.e mapping basic operations from one ISA to the other is known as dynamic translation and most of current emulators work this way (for example qemu). Once upon the time there was also mixed hardware-software implementation of this concept (Transmeta Cruzoe) which proven to be unsuccessful.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Why processor emulation is slow?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.07 seconds with 15 queries.