Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Dynamic recompilation

From Wikipedia, the free encyclopedia
On-the-fly translation of code between CPUs
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Dynamic recompilation" – news ·newspapers ·books ·scholar ·JSTOR
(January 2014) (Learn how and when to remove this message)
This articlecontainsweasel words: vague phrasing that often accompaniesbiased orunverifiable information. Such statements should beclarified or removed.(January 2014)
This articlepossibly containsoriginal research. Pleaseimprove it byverifying the claims made and addinginline citations. Statements consisting only of original research should be removed.(June 2021) (Learn how and when to remove this message)
icon
This article'slead sectionmay be too short to adequatelysummarize the key points. Please consider expanding the lead toprovide an accessible overview of all important aspects of the article.(June 2021)
(Learn how and when to remove this message)

Program execution
General concepts
Types of code
Compilation strategies
Notable runtimes
Notable compilers & toolchains

Incomputer science,dynamic recompilation is a feature of someemulators andvirtual machines, where the system mayrecompile some part of aprogram during execution. By compiling during execution, the system can tailor the generated code to reflect the program's run-time environment, and potentially produce more efficientcode by exploiting information that is not available to a traditional staticcompiler.

Uses

[edit]

Most dynamic recompilers are used to convert machine code between architectures at runtime. This is a task often needed in the emulation of legacy gaming platforms. In other cases, a system may employ dynamic recompilation as part of anadaptive optimization strategy to execute a portable program representation such asJava or .NETCommon Language Runtime bytecodes. Full-speed debuggers also utilize dynamic recompilation to reduce the space overhead incurred in mostdeoptimization techniques, and other features such as dynamicthread migration.

Tasks

[edit]

The main tasks a dynamic recompiler has to perform are:

  • Reading in machine code from the source platform
  • Emitting machine code for the target platform

A dynamic recompiler may also perform some auxiliary tasks:

  • Managing acache of recompiled code
  • Updating of elapsed cycle counts on platforms with cycle count registers
  • Management ofinterrupt checking
  • Providing an interface to virtualized support hardware, for example aGPU
  • Optimizing higher-level code structures to run efficiently on the target hardware (see below)

Applications

[edit]
This articlemay containexcessive orirrelevant examples. Please helpimprove it by removingless pertinent examples andelaborating on existing ones.(June 2021) (Learn how and when to remove this message)
  • ManyJava virtual machines feature dynamic recompilation.
  • Apple'sRosetta forMac OS X on x86, allowsPowerPC code to be run on thex86 architecture.
  • Later versions of theMac 68K emulator used inclassic Mac OS to run680x0 code on the PowerPC hardware.
  • Psyco, aspecializing compiler forPython.
  • The HPDynamo project, an example of a transparent binary dynamicoptimizer.[1]
  • DynamoRIO, anopen-source successor to Dynamo that works with theARM,x86-64 andIA-64 (Itanium) instruction sets.[2][3]
  • TheVx32 virtual machine employs dynamic recompilation to createOS-independent x86 architecture sandboxes for safe applicationplugins.
  • Microsoft Virtual PC for Mac, used to run x86 code on PowerPC.
  • FreeKEYB, an international DOS keyboard and console driver with many usability enhancements utilizedself-modifying code anddynamic dead code elimination to minimize its in-memory image based on its user configuration (selected features, languages, layouts) and actual runtime environment (OS variant and version, loaded drivers, underlying hardware), automatically resolving dependencies, dynamically relocating and recombining code sections on byte-level granularity and optimizing opstrings based on semantic information provided in the source code, relocation information generated by special tools during assembly and profile information obtained at load time.[4]
  • The backwards compatibility functionality of theXbox 360 (i.e. running games written for the originalXbox) is widely assumed to use dynamic recompilation.
  • Apple'sRosetta 2 for Apple silicon, permits many applications compiled forx86-64-based processors to be translated for execution on Apple silicon.
  • QEMU

Emulators

[edit]
  • PCSX2,[5] aPlayStation 2 emulator, has a recompiler called "microVU", the successor of "SuperVU".
  • GCemu,[6] aGameCube emulator.
  • GEM,[7] aGame Boy emulator forMSX uses an optimizing dynamic recompiler.
  • DeSmuME,[8] aNintendo DS emulator, has a dynarec option.
  • Soywiz's Psp,[9] aPlayStation Portable emulator, has a dynarec option.
  • Mupen64Plus, a multi-platform Nintendo 64 emulator.[10]
  • Yabause, a multi-platformSaturn emulator.[11]
  • PPSSPP, a multi-platformPlayStation Portable emulator, uses aJIT dynamic recompiler by default.[12]
  • PCem, an emulator for old pc platforms which can be used on Windows and Linux. It uses the recompiler to translate legacy cpu calls to modern cpu instructions and to gain some speed in emulation overall.
  • 86Box, a fork of PCem with the goal of a more accurate emulation. It is using the recompiler for the same purpose.

See also

[edit]

References

[edit]
  1. ^"HP Labs' technical report on Dynamo". Archived fromthe original on 2008-07-07. Retrieved2006-01-22.
  2. ^"DynamoRIO Dynamic Instrumentation Tool Platform". Archived fromthe original on 2019-09-05. Retrieved2016-04-12.
  3. ^"DynamoRIO".GitHub. 2021-10-15.
  4. ^Paul, Matthias R.; Frinke, Axel C. (1997-10-13) [first published 1991],FreeKEYB - Enhanced DOS keyboard and console driver (User Manual) (v6.5 ed.)
  5. ^"PCSX 2". Archived fromthe original on 2005-10-29. Retrieved2009-04-15.
  6. ^petebernert (2015-10-03)."GCemu".SourceForge.
  7. ^"Gameboy Emulator for MSX | The New Image". GEM. Retrieved2014-01-12.
  8. ^"DeSmuME v0.9.9".
  9. ^Publicado por Carlos Ballesteros Velasco (2013-07-28)."Soywiz's PSP Emulator: Release : Soywiz's Psp Emulator 2013-07-28 (r525)". Pspemu.soywiz.com. Retrieved2014-01-12.
  10. ^Mupen64Plus
  11. ^"SH2".
  12. ^"PPSSPP - PPSSPP - PSP emulator for Android, Windows, Linux, iOS, MacOSX".ppsspp.org. Retrieved2021-11-17.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Dynamic_recompilation&oldid=1314454552"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp