Binary translation

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 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 times, 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.

* Apple Computer implemented a dynamic translating emulator for M68K code in their PowerPC line of Macintoshes, which achieved a very high level of reliability, performance and compatibility (see Mac 68K emulator). This allowed Apple to bring the machines to market with only a partially native operating system, and end users could adopt the new, faster architecture without risking their investment in software. Partly because the emulator was so successful, many parts of the operating system remained emulated. A full transition to a PowerPC native operating system (OS) was not made until the release of Mac OS X (10.0) in 2001, and within this new OS the "Classic" runtime environment still offers the emulation capability on PowerPC Macs. Also, the Rosetta translation layer included in releases of Mac OS 10.4 for Intel-based Macs, which is used to ease the transition from the PPC to x86, is an example of dynamic translation. Developed for Apple by Transitive, the Rosetta software is an implementation of Transitive's QuickTransit solution, which can be used to dynamically translate between platforms that include SPARC, PowerPC, MIPS, Itanium and x86.

* DEC achieved similar success with its translation tools to help users migrate from the CISC VAX architecture to the DEC Alpha RISC architecture.

* DEC created FX!32 binary translator for converting X86 CPU applications to DEC Alpha applications.

* In March 2006 Intel had announced plans to support Transitive Binary Translator on their future Itanium and Xeon CPU.

* Sun and IBM are also utilizing QuickTransit by Transitive. SPARCx86 in Sun's case and x86→Power Architecture in IBM's. The latter is called PowerVM Lx86.

* In January 2000, Transmeta Corporation announced a novel processor design named Crusoe. From the [http://www.transmeta.com/crusoe/faq.html FAQ] on their web site, "The smart microprocessor consists of a hardware VLIW core as its engine and a software layer called Code Morphing software. The Code Morphing software acts as a shell ... morphing or translating x86 instructions to native Crusoe instructions. In addition, the Code Morphing software contains a dynamic compiler and code optimizer ... The result is increased performance at the least amount of power. ... [This] allows Transmeta to evolve the VLIW hardware and Code Morphing software separately without affecting the huge base of software applications." More info at [http://www.arstechnica.com/cpu/1q00/crusoe/crusoe-1.html arstechnica] , [http://www.geek.com/procspec/features/transmeta/crusoe.htm geek.com] .

See also

* Just-in-time compilation
* Virtual machine
* Emulator
* Comparison of virtual machines

External links

* http://www.transitive.com
* http://www.serverpipeline.com/181501677 - Future Intel Itanium and Xeon CPU will be designed to support Transitive Binary Translator.
* http://bellard.org/qemu/
* http://www.itee.uq.edu.au/~csmweb/decompilation/bintrans.html (somewhat dated)
* http://www.gtoal.com/sbt/ Static Binary Translation HOWTO
* http://www.itee.uq.edu.au/~cristina/uqbt.html University of Queensland Binary Translator
* http://www.experimentalstuff.com/Technologies/Walkabout/ Walkabout - Binary Translation research by Sun and University collaborators
* http://csdl.computer.org/comp/mags/mi/1998/02/m2056abs.htm - FX!32 DEC binary translator from X86 CPU applications to DEC Alpha CPU applications.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Rosetta (binary translation software) — Infobox Software | name = Rosetta logo = caption = PowerPC application (Microsoft Word for Mac 2004) running on OS X for Intel developer = Apple Inc. latest release version = latest release date = operating system = Mac OS X genre = PowerPC… …   Wikipedia

  • Binary-coded decimal — In computing and electronic systems, binary coded decimal (BCD) is a digital encoding method for numbers using decimal notation, with each decimal digit represented by its own binary sequence. In BCD, a numeral is usually represented by four bits …   Wikipedia

  • Binary file — binaries redirects here. For double stars, see Binary star. .bin redirects here. For The CD image format, see Disk image. A hex dump of the 318 byte Wikipedia favicon, or …   Wikipedia

  • Binary splitting — In mathematics, binary splitting is a technique for speeding up numerical evaluation of many types of series with rational terms. In particular, it can be used to evaluate hypergeometric series at rational points. Given a series where pn and qn… …   Wikipedia

  • Redundant binary representation — A redundant binary representation (RBR) is a numeral system that uses more bits than needed to represent a single binary digit so that most numbers have several representations. RBR is unlike usual binary numeral systems, including two s… …   Wikipedia

  • Fan translation of video games — refers to an unofficial translation of a computer game or video game, sometimes into a language that it was never marketed in. The fan translation practice grew with the rise of video game console emulation in the late 1990s. A community of… …   Wikipedia

  • Fan translation (video gaming) — For other uses, see Fan translation. A fan translation, in video gaming, refers to an unofficial translation of a computer game or video game. The fan translation practice grew with the rise of video game console emulation in the late 1990s.[1] A …   Wikipedia

  • Extended Binary Coded Decimal Interchange Code — (EBCDIC) is an 8 bit character encoding (code page) used on IBM mainframe operating systems such as z/OS, OS/390, VM and VSE, as well as IBM midrange computer operating systems such as OS/400 and i5/OS (see also Binary Coded Decimal). It is also… …   Wikipedia

  • Fan translation — refers to the unofficial translation of various forms of media by fans, usually into a language in which an official translated version is not available. These translations are distributed for free or at minimal cost. The rise of the Internet has …   Wikipedia

  • Hexadecimal — In mathematics and computer science, hexadecimal (also base num|16 , hexa, or hex) is a numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0 ndash;9 to represent values zero to nine, and A , B ,… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”