Frage

It seems like given a full reference of instructions for any two platforms, say x86 and ARM, it should be possible to convert a program compiled for the first platform to the second one. Those instructions that one of the platform lacks can be implemented as a series of more primitive instructions. Ultimately, what CPU does are I/O and arithmetic. If so, why people develop emulators that interpret code at a higher level rather than developing instruction translators which would allow to have binaries running at the native speed of the target platform?

War es hilfreich?

Lösung

It is called binary translation, and it is done in several applications. For example Intel performs binary translation of Android applications compiled for ARM. Some instructions can be translated easily, while others require more complex emulation.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top