Encyclopedia > Binary translation

  Article Content

Binary translation

In computing, binary translation is the emulation of one instruction set by another through translation of code. Sequences of instructions are translated from the source to the target instruction set.

There is static binary translation, where an entire executable file[?] is translated into an executable of the target architecture. This is very difficult to do correctly, since not all the code can be discovered by the translator. For example, some parts of the executable may be reachable only through indirect branches[?], whose value is only known at run-time.

Alternatively, dynamic translation looks at a short sequence of code, typically on the order of a single basic block, translates it and caches the resulting sequence. Code is only translated as it is discovered and when possible, branch instructions are made to point to translated code.

Dynamic binary translation differs from simple emulation by eliminating the emulator's main read-decode-execute loop (a major performance bottleneck), paying for this by large overhead during translation time. This overhead is hopefully amortized as translated code sequences are executed multiple times.

More advanced dynamic translators employ dynamic recompilation: the translated code is instrumented to find out what portions are executed a large number of time, and these portions are optimized aggressively. This technique is reminiscent of a JIT compiler, and in fact such compilers (e.g. Sun's HotSpot[?] technology) can be viewed as dynamic translators from a virtual instruction set (the bytecode) to a real one.

To do: a few historical examples.

See Also

External Links



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
U.S. presidential election, 1804

... 1792, 1796, 1800, 1804, 1808, 1812, 1816 Source: U.S. Office of the Federal R ...

 
 
 
This page was created in 23.7 ms