All Topics  
Binary translation

 

   Email Print
   Bookmark   Link






 

Binary translation



 
 
In computing
Computing

Computing is usually defined as the activity of using and developing computer technology, computer hardware and computer software. It is the computer-specific part of information technology....
, binary translation is the emulation of one instruction set
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
 by another through translation of code. Sequences of instruction
Instruction (computer science)

In computer science, an instruction is a single operation of a central processing unit defined by an instruction set architecture. In a broader sense, an "instruction" may be any representation of an element of an executable program, such as a bytecode....
s 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.






Discussion
Ask a question about 'Binary translation'
Start a new discussion about 'Binary translation'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computing
Computing

Computing is usually defined as the activity of using and developing computer technology, computer hardware and computer software. It is the computer-specific part of information technology....
, binary translation is the emulation of one instruction set
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
 by another through translation of code. Sequences of instruction
Instruction (computer science)

In computer science, an instruction is a single operation of a central processing unit defined by an instruction set architecture. In a broader sense, an "instruction" may be any representation of an element of an executable program, such as a bytecode....
s 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 branch
Indirect branch

An indirect branch is a type of control flow present in some machine language instruction sets. Rather than specifying the memory address of the next instruction to execution , as in a direct Branch , the parameter specifies where the address is located....
es, 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
Basic block

In computing, a basic block is code that has one entry point , one exit point and no jump instructions contained within it. The start of a basic block may be jumped to from more than one location....
, 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
Dynamic recompilation

In computer science, dynamic recompilation is a feature of some emulators and virtual machines, where the system may compile some part of a Computer program during execution....
: the translated code is instrumented to find out what portions are executed a large number of times, and these portions are optimized
Compiler optimization

Compiler optimization is the process of tuning the output of a compiler to minimize or maximize some attribute of an executable computer program....
 aggressively. This technique is reminiscent of a JIT compiler, and in fact such compilers (e.g. Sun
Sun Microsystems

Sun Microsystems, Inc. is a multinational corporation vendor of computers, computer components, computer software, and information technology services, founded on February 24, 1982....
's HotSpot technology) can be viewed as dynamic translators from a virtual instruction set (the bytecode
Bytecode

Bytecode is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software Interpreter as well as being suitable for further compilation into machine language....
) to a real one.

  • Apple Computer
    Apple Computer

    Apple Inc., formerly Apple Computer Inc., is an United States multinational corporation which designs and manufactures consumer electronics and software products....
     implemented a dynamic translating emulator
    Emulator

    An emulator duplicates the functions of one system using a different system, so that the second system behaves like the first system. This focus on exact reproduction of external behavior is in contrast to some other forms of computer simulation, which can concern an abstract model of the system being simulated....
     for M68K
    Motorola 68000

    The Motorola 68000 is a 16/32-bit Complex instruction set computer microprocessor core designed and marketed by Freescale Semiconductor ....
     code in their PowerPC
    PowerPC

    PowerPC is a RISC instruction set architecture created by the 1991 Apple Inc.?IBM?Motorola alliance, known as AIM alliance. Originally intended for personal computers, PowerPC CPUs have since become popular embedded system and high-performance processors....
     line of Macintoshes, which achieved a very high level of reliability, performance and compatibility (see Mac 68K emulator
    Mac 68K emulator

    The Mac 68K emulator was a software emulator built into all versions of the Mac OS for PowerPC. This emulator permitted the running of applications and system code that were originally written for the 680x0 based Apple Macintosh models....
    ). This allowed Apple to bring the machines to market with only a partially native operating system
    Operating system

    An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
    , 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
    Operating system

    An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
     (OS) was not made until the release of Mac OS X
    Mac OS X

    Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems....
     (10.0) in 2001, and within this new OS the "Classic
    Classic (Mac OS X)

    Classic, or Classic Environment, was a Computer hardware and software abstraction layer in Mac OS X that allowed Application software compatible with Mac OS 9 to run on the Mac OS X operating system....
    " runtime environment still offers the emulation capability on PowerPC Macs. Also, the Rosetta
    Rosetta (software)

    Rosetta is a lightweight binary translation for Mac OS X distributed by Apple Inc.. It enables applications compiled for the PowerPC family of processors to run on Apple systems that use Intel central processing units....
     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
    QuickTransit

    QuickTransit is cross-platform virtualization software developed by Transitive Corporation. It allows software compiled for one specific central processing unit and operating system combination to be executed on a different processor and/or operating system architecture without source code or binary changes....
     solution, which can be used to dynamically translate between platforms that include SPARC, PowerPC, MIPS, Itanium and x86.


  • DEC
    Digital Equipment Corporation

    Digital Equipment Corporation was a pioneering United States company in the computer industry. It is often referred to within the computing industry as DEC ....
     achieved similar success with its translation tools to help users migrate from the CISC
    Complex instruction set computer

    A complex instruction set computer is a computer instruction set architecture in which each instruction can execute several low-level operations, such as a load from Memory , an arithmetic operator, and a memory , all in a single instruction....
     VAX
    VAX

    VAX was an instruction set architecture developed by Digital Equipment Corporation in the mid-1970s. A 32-bit complex instruction set computer ISA, it was designed to extend or replace DEC's various Programmed Data Processor ISAs....
     architecture to the DEC Alpha
    DEC Alpha

    Alpha, originally known as Alpha AXP, was a 64-bit reduced instruction set computer instruction set architecture developed by Digital Equipment Corporation , designed to replace the 32-bit VAX complex instruction set computer ISA and its implementations....
     RISC architecture.


  • DEC
    Digital Equipment Corporation

    Digital Equipment Corporation was a pioneering United States company in the computer industry. It is often referred to within the computing industry as DEC ....
     created FX!32
    FX!32

    FX!32 is a software emulator program that allows x86 Win32 programs to execute on Alpha-based systems running Windows NT. Released in 1996, FX!32 was developed by Digital Equipment Corporation to support their DEC Alpha microprocessors....
     binary translator for converting X86 CPU applications to DEC Alpha
    DEC Alpha

    Alpha, originally known as Alpha AXP, was a 64-bit reduced instruction set computer instruction set architecture developed by Digital Equipment Corporation , designed to replace the 32-bit VAX complex instruction set computer ISA and its implementations....
     applications.


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


  • Sun
    Sun Microsystems

    Sun Microsystems, Inc. is a multinational corporation vendor of computers, computer components, computer software, and information technology services, founded on February 24, 1982....
    , IBM
    IBM

    International Business Machines Corporation, abbreviated IBM and nicknamed "Big Blue" , is a multinational corporation computer technology and consulting corporation headquartered in Armonk, New York, New York, United States....
     and SGI
    SGI

    SGI can refer to:*Saskatchewan Government Insurance* Scientific Games International: see Scientific Games Corporation*Silicon Graphics, Inc., a manufacturer of high-performance computing solutions....
     are also utilizing QuickTransit by Transitive. SPARC
    SPARC

    SPARC is a Reduced Instruction Set Computer microprocessor instruction set Computer architecture originally designed in 1985 by Sun Microsystems....
    ?x86 in Sun's case, x86?Power Architecture
    Power Architecture

    Power Architecture is a broad term to describe similar RISC instruction sets for microprocessors developed and manufactured by such companies as IBM, Freescale, Applied Micro Circuits Corporation, Tundra Semiconductor and P.A....
     in IBM's, and MIPS
    MIPS

    MIPS may refer to:* Mansehra International Public School and College, in Mansehra, Pakistan* Material input per unit of service, an economic efficiency indicator...
    ?Itanium2 in SGI's. Sun's implementation is called PowerVM Lx86
    Lx86

    PowerVM Lx86, formerly known as System p AVE, is a binary translation layer for IBM's System p servers. It enables 32-bit x86 Linux executable to run unmodified on the Power Architecture based hardware....
    .


  • In January 2000, Transmeta
    Transmeta

    Transmeta Corporation was a United States-based corporation that licensed low power semiconductor intellectual property. Transmeta originally produced very long instruction word code morphing microprocessors, with a focus on reducing power consumption in electronic devices....
     Corporation announced a novel processor design named Crusoe. From the 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 , .


See also

  • Just-in-time compilation
    Just-in-time compilation

    In computing, just-in-time compilation , also known as dynamic translation, is a technique for improving the runtime performance of a computer program....
  • Virtual machine
    Virtual machine

    In computer science, a virtual machine is a software implementation of a machine that executes programs like a real machine.Definitions...
  • Emulator
    Emulator

    An emulator duplicates the functions of one system using a different system, so that the second system behaves like the first system. This focus on exact reproduction of external behavior is in contrast to some other forms of computer simulation, which can concern an abstract model of the system being simulated....
  • Comparison of platform virtual machines


External links

  • - Future Intel Itanium and Xeon CPU will be designed to support Transitive Binary Translator.
  • (somewhat dated)
  • Static Binary Translation HOWTO
  • University of Queensland Binary Translator
  • Walkabout - Binary Translation research by Sun and University collaborators
  • - FX!32
    FX!32

    FX!32 is a software emulator program that allows x86 Win32 programs to execute on Alpha-based systems running Windows NT. Released in 1996, FX!32 was developed by Digital Equipment Corporation to support their DEC Alpha microprocessors....
     DEC binary translator from X86 CPU applications to DEC Alpha
    DEC Alpha

    Alpha, originally known as Alpha AXP, was a 64-bit reduced instruction set computer instruction set architecture developed by Digital Equipment Corporation , designed to replace the 32-bit VAX complex instruction set computer ISA and its implementations....
     CPU applications.