Knowledge

Dynamic recompilation

Source 📝

63: 786: 217: 165: 22: 279: 950:
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
704:
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 an
951:
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.
1060:, a 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. 688:
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 efficient
1357: 300: 175: 1086: 651: 800: 287: 1116: 127: 191: 99: 1096: 80: 35: 106: 1354: 796: 1366: 113: 325: 260: 146: 49: 242: 485: 95: 717:
bytecodes. Full-speed debuggers also utilize dynamic recompilation to reduce the space overhead incurred in most
644: 179: 1281: 1141: 1386: 227: 84: 1066:, a fork of PCem with the goal of a more accurate emulation. It is using the recompiler for the same purpose. 947: 882: 529: 578: 1391: 710: 386: 637: 539: 41: 942:
FreeKEYB, an international DOS keyboard and console driver with many usability enhancements utilized
502: 473: 402: 1201: 1091: 1051: 557: 479: 120: 1313: 1381: 812: 714: 610: 535: 414: 292: 238: 183: 73: 808: 625: 584: 362: 234: 893: 878: 771:
Optimizing higher-level code structures to run efficiently on the target hardware (see below)
706: 490: 392: 343: 1047: 1024: 936: 903: 834: 563: 1120: 8: 943: 930: 379: 1301: 1266: 1081: 841: 1076: 749: 926: 907: 860: 853: 722: 685: 665: 357: 1361: 677: 523: 419: 1227: 1282:"Soywiz's PSP Emulator: Release : Soywiz's Psp Emulator 2013-07-28 (r525)" 959: 889: 864: 718: 497: 397: 1375: 992: 452: 372: 1328:"PPSSPP - PPSSPP - PSP emulator for Android, Windows, Linux, iOS, MacOSX" 1166: 1037: 1030: 1017: 593: 574: 442: 437: 1279: 995:
emulator, has a recompiler called "microVU", the successor of "SuperVU".
755:
Updating of elapsed cycle counts on platforms with cycle count registers
692:
by exploiting information that is not available to a traditional static
409: 765:
Providing an interface to virtualized support hardware, for example a
1145: 966: 899: 759: 457: 245:. Statements consisting only of original research should be removed. 62: 1006: 999: 955: 845: 693: 681: 673: 447: 367: 973:-based processors to be translated for execution on Apple silicon. 849: 588: 544: 278: 1171: 1043: 970: 911: 569: 709:
strategy to execute a portable program representation such as
1063: 988: 929:-independent x86 architecture sandboxes for safe application 915: 874: 868: 620: 744:
A dynamic recompiler may also perform some auxiliary tasks:
1057: 976: 922: 689: 616: 553: 548: 969:
for Apple silicon, permits many applications compiled for
1367:
Blog posts about writing a MIPS to PPC dynamic recompiler
1205: 1010: 766: 733:
The main tasks a dynamic recompiler has to perform are:
1280:
Publicado por Carlos Ballesteros Velasco (2013-07-28).
1327: 1245: 1188:
FreeKEYB - Enhanced DOS keyboard and console driver
87:. Unsourced material may be challenged and removed. 1186:Paul, Matthias R.; Frinke, Axel C. (1997-10-13) , 1179: 1142:"DynamoRIO Dynamic Instrumentation Tool Platform" 962:) is widely assumed to use dynamic recompilation. 954:The backwards compatibility functionality of the 1373: 737:Reading in machine code from the source platform 1246:"Gameboy Emulator for MSX | The New Image" 721:techniques, and other features such as dynamic 1087:Comparison of platform virtualization software 1109: 958:(i.e. running games written for the original 892:, an example of a transparent binary dynamic 740:Emitting machine code for the target platform 645: 1225: 50:Learn how and when to remove these messages 1185: 652: 638: 939:for Mac, used to run x86 code on PowerPC. 326:Learn how and when to remove this message 261:Learn how and when to remove this message 147:Learn how and when to remove this message 1033:, a multi-platform Nintendo 64 emulator. 925:employs dynamic recompilation to create 906:successor to Dynamo that works with the 811:by adding descriptive text and removing 303:of all important aspects of the article. 178:: vague phrasing that often accompanies 1374: 1097:Instrumentation (computer programming) 1013:uses an optimizing dynamic recompiler. 299:Please consider expanding the lead to 1117:"HP Labs' technical report on Dynamo" 779: 272: 210: 158: 85:adding citations to reliable sources 56: 15: 13: 603:Notable compilers & toolchains 14: 1403: 1348: 31:This article has multiple issues. 784: 277: 215: 163: 61: 20: 1320: 1306: 1295: 1027:emulator, has a dynarec option. 1020:emulator, has a dynarec option. 775: 291:may be too short to adequately 72:needs additional citations for 39:or discuss these issues on the 1273: 1259: 1238: 1219: 1194: 1159: 1134: 1054:dynamic recompiler by default. 837:feature dynamic recompilation. 301:provide an accessible overview 1: 1190:(User Manual) (v6.5 ed.) 1102: 948:dynamic dead code elimination 871:code on the PowerPC hardware. 982: 560:target-specific initializer) 7: 1355:Dynamic recompiler tutorial 1070: 918:(Itanium) instruction sets. 387:Intermediate representation 241:the claims made and adding 10: 1408: 1226:petebernert (2015-10-03). 1036:Yabause, a multi-platform 190:Such statements should be 1092:Just-in-time compilation 728: 813:less pertinent examples 715:Common Language Runtime 699: 680:, where the system may 611:GNU Compiler Collection 536:Common Language Runtime 96:"Dynamic recompilation" 859:Later versions of the 852:code to be run on the 466:Compilation strategies 1387:Compiler construction 879:specializing compiler 835:Java virtual machines 707:adaptive optimization 672:is a feature of some 670:dynamic recompilation 491:Compile and go system 1048:PlayStation Portable 1025:PlayStation Portable 937:Microsoft Virtual PC 923:Vx32 virtual machine 564:Java virtual machine 486:Tracing just-in-time 192:clarified or removed 81:improve this article 1284:. Pspemu.soywiz.com 1046:, a multi-platform 944:self-modifying code 809:improve the article 380:Optimizing compiler 1392:Emulation software 1360:2021-06-11 at the 1082:Binary translation 752:of recompiled code 226:possibly contains 1077:Binary recompiler 1050:emulator, uses a 830: 829: 662: 661: 344:Program execution 336: 335: 328: 318: 317: 271: 270: 263: 228:original research 209: 208: 157: 156: 149: 131: 54: 1399: 1342: 1341: 1339: 1338: 1324: 1318: 1317: 1310: 1304: 1299: 1293: 1292: 1290: 1289: 1277: 1271: 1270: 1267:"DeSmuME v0.9.9" 1263: 1257: 1256: 1254: 1253: 1242: 1236: 1235: 1223: 1217: 1216: 1214: 1213: 1204:. Archived from 1198: 1192: 1191: 1183: 1177: 1176: 1163: 1157: 1156: 1154: 1153: 1144:. Archived from 1138: 1132: 1131: 1129: 1128: 1119:. Archived from 1113: 1023:Soywiz's Psp, a 861:Mac 68K emulator 854:x86 architecture 825: 822: 816: 788: 787: 780: 723:thread migration 678:virtual machines 666:computer science 654: 647: 640: 516:Notable runtimes 503:Transcompilation 350:General concepts 340: 339: 331: 324: 313: 310: 304: 281: 273: 266: 259: 255: 252: 246: 243:inline citations 219: 218: 211: 204: 201: 195: 167: 166: 159: 152: 145: 141: 138: 132: 130: 89: 65: 57: 46: 24: 23: 16: 1407: 1406: 1402: 1401: 1400: 1398: 1397: 1396: 1372: 1371: 1362:Wayback Machine 1351: 1346: 1345: 1336: 1334: 1326: 1325: 1321: 1312: 1311: 1307: 1300: 1296: 1287: 1285: 1278: 1274: 1265: 1264: 1260: 1251: 1249: 1244: 1243: 1239: 1224: 1220: 1211: 1209: 1200: 1199: 1195: 1184: 1180: 1165: 1164: 1160: 1151: 1149: 1140: 1139: 1135: 1126: 1124: 1115: 1114: 1110: 1105: 1073: 985: 848:on x86, allows 826: 820: 817: 806: 789: 785: 778: 731: 702: 684:some part of a 658: 538:(CLR) and  524:Android Runtime 420:Virtual machine 332: 321: 320: 319: 314: 308: 305: 298: 286:This article's 282: 267: 256: 250: 247: 232: 220: 216: 205: 199: 196: 189: 168: 164: 153: 142: 136: 133: 90: 88: 78: 66: 25: 21: 12: 11: 5: 1405: 1395: 1394: 1389: 1384: 1382:Virtualization 1370: 1369: 1364: 1350: 1349:External links 1347: 1344: 1343: 1319: 1305: 1294: 1272: 1258: 1237: 1218: 1193: 1178: 1158: 1133: 1107: 1106: 1104: 1101: 1100: 1099: 1094: 1089: 1084: 1079: 1072: 1069: 1068: 1067: 1061: 1055: 1041: 1034: 1028: 1021: 1014: 1003: 996: 984: 981: 980: 979: 974: 963: 952: 940: 934: 919: 897: 890:Dynamo project 886: 872: 865:classic Mac OS 857: 838: 828: 827: 792: 790: 783: 777: 774: 773: 772: 769: 763: 758:Management of 756: 753: 742: 741: 738: 730: 727: 719:deoptimization 701: 698: 660: 659: 657: 656: 649: 642: 634: 631: 630: 629: 628: 623: 614: 605: 604: 600: 599: 598: 597: 591: 582: 572: 567: 561: 551: 542: 533: 527: 518: 517: 513: 512: 511: 510: 505: 500: 498:Precompilation 495: 494: 493: 488: 477: 468: 467: 463: 462: 461: 460: 455: 450: 445: 440: 432: 431: 427: 426: 425: 424: 423: 422: 417: 412: 407: 406: 405: 398:Runtime system 390: 384: 383: 382: 377: 376: 375: 360: 352: 351: 347: 346: 334: 333: 316: 315: 295:the key points 285: 283: 276: 269: 268: 223: 221: 214: 207: 206: 171: 169: 162: 155: 154: 69: 67: 60: 55: 29: 28: 26: 19: 9: 6: 4: 3: 2: 1404: 1393: 1390: 1388: 1385: 1383: 1380: 1379: 1377: 1368: 1365: 1363: 1359: 1356: 1353: 1352: 1333: 1329: 1323: 1315: 1309: 1303: 1298: 1283: 1276: 1268: 1262: 1247: 1241: 1233: 1229: 1222: 1208:on 2005-10-29 1207: 1203: 1197: 1189: 1182: 1175:. 2021-10-15. 1174: 1173: 1168: 1162: 1148:on 2019-09-05 1147: 1143: 1137: 1123:on 2008-07-07 1122: 1118: 1112: 1108: 1098: 1095: 1093: 1090: 1088: 1085: 1083: 1080: 1078: 1075: 1074: 1065: 1062: 1059: 1056: 1053: 1049: 1045: 1042: 1039: 1035: 1032: 1029: 1026: 1022: 1019: 1015: 1012: 1009:emulator for 1008: 1004: 1001: 997: 994: 993:PlayStation 2 990: 987: 986: 978: 975: 972: 968: 964: 961: 957: 953: 949: 945: 941: 938: 935: 932: 928: 924: 920: 917: 913: 909: 905: 901: 898: 895: 891: 887: 884: 880: 876: 873: 870: 866: 862: 858: 855: 851: 847: 843: 839: 836: 832: 831: 824: 814: 810: 804: 802: 798: 793:This article 791: 782: 781: 770: 768: 764: 761: 757: 754: 751: 747: 746: 745: 739: 736: 735: 734: 726: 724: 720: 716: 712: 708: 697: 695: 691: 687: 683: 679: 675: 671: 667: 655: 650: 648: 643: 641: 636: 635: 633: 632: 627: 624: 622: 618: 615: 612: 609: 608: 607: 606: 602: 601: 595: 592: 590: 586: 583: 580: 576: 573: 571: 568: 565: 562: 559: 555: 552: 550: 546: 543: 541: 537: 534: 531: 528: 525: 522: 521: 520: 519: 515: 514: 509: 508:Recompilation 506: 504: 501: 499: 496: 492: 489: 487: 484: 483: 481: 478: 475: 474:Ahead-of-time 472: 471: 470: 469: 465: 464: 459: 456: 454: 451: 449: 446: 444: 441: 439: 436: 435: 434: 433: 430:Types of code 429: 428: 421: 418: 416: 413: 411: 408: 404: 401: 400: 399: 396: 395: 394: 391: 388: 385: 381: 378: 374: 371: 370: 369: 366: 365: 364: 361: 359: 356: 355: 354: 353: 349: 348: 345: 342: 341: 338: 330: 327: 312: 302: 296: 294: 289: 284: 280: 275: 274: 265: 262: 254: 244: 240: 236: 230: 229: 224:This article 222: 213: 212: 203: 193: 187: 185: 181: 177: 172:This article 170: 161: 160: 151: 148: 140: 129: 126: 122: 119: 115: 112: 108: 105: 101: 98: –  97: 93: 92:Find sources: 86: 82: 76: 75: 70:This article 68: 64: 59: 58: 53: 51: 44: 43: 38: 37: 32: 27: 18: 17: 1335:. Retrieved 1331: 1322: 1308: 1297: 1286:. Retrieved 1275: 1261: 1250:. Retrieved 1240: 1231: 1221: 1210:. Retrieved 1206:the original 1196: 1187: 1181: 1170: 1161: 1150:. Retrieved 1146:the original 1136: 1125:. Retrieved 1121:the original 1111: 818: 807:Please help 795:may contain 794: 776:Applications 743: 732: 703: 669: 663: 507: 480:Just-in-time 453:Machine code 373:Compile time 337: 322: 306: 290: 288:lead section 257: 248: 225: 200:January 2014 197: 184:unverifiable 176:weasel words 173: 143: 137:January 2014 134: 124: 117: 110: 103: 91: 79:Please help 74:verification 71: 47: 40: 34: 33:Please help 30: 1302:Mupen64Plus 1232:SourceForge 1167:"DynamoRIO" 1031:Mupen64Plus 1018:Nintendo DS 1016:DeSmuME, a 904:open-source 748:Managing a 594:Zend Engine 575:Objective-C 443:Object code 438:Source code 415:Interpreter 363:Translation 186:information 1376:Categories 1337:2021-11-17 1332:ppsspp.org 1288:2014-01-12 1252:2014-01-12 1212:2009-04-15 1152:2016-04-12 1127:2006-01-22 1103:References 801:irrelevant 410:Executable 235:improve it 107:newspapers 36:improve it 1040:emulator. 1002:emulator. 998:GCemu, a 983:Emulators 967:Rosetta 2 900:DynamoRIO 894:optimizer 821:June 2021 797:excessive 760:interrupt 682:recompile 674:emulators 619:and  587:and  577:and  547:and  458:Microcode 393:Execution 309:June 2021 293:summarize 251:June 2021 239:verifying 174:contains 42:talk page 1358:Archived 1202:"PCSX 2" 1071:See also 1007:Game Boy 1000:GameCube 965:Apple's 956:Xbox 360 863:used in 846:Mac OS X 840:Apple's 803:examples 762:checking 713:or .NET 694:compiler 532:(Erlang) 448:Bytecode 368:Compiler 1228:"GCemu" 1005:GEM, a 931:plugins 888:The HP 867:to run 850:PowerPC 842:Rosetta 686:program 589:Node.js 545:CPython 403:Runtime 233:Please 121:scholar 1172:GitHub 1044:PPSSPP 1038:Saturn 971:x86-64 912:x86-64 883:Python 570:LuaJIT 482:(JIT) 180:biased 123:  116:  109:  102:  94:  1314:"SH2" 1248:. GEM 1064:86Box 989:PCSX2 916:IA-64 902:, an 875:Psyco 869:680x0 833:Many 750:cache 729:Tasks 621:Clang 613:(GCC) 596:(PHP) 579:Swift 566:(JVM) 526:(ART) 476:(AOT) 128:JSTOR 114:books 1058:PCem 991:, a 977:QEMU 960:Xbox 946:and 921:The 914:and 881:for 877:, a 844:for 711:Java 700:Uses 690:code 676:and 626:MSVC 617:LLVM 554:crt0 549:PyPy 540:Mono 530:BEAM 389:(IR) 358:Code 100:news 1052:JIT 1011:MSX 908:ARM 799:or 767:GPU 664:In 237:by 182:or 83:by 1378:: 1330:. 1230:. 1169:. 927:OS 910:, 725:. 696:. 668:, 585:V8 581:'s 45:. 1340:. 1316:. 1291:. 1269:. 1255:. 1234:. 1215:. 1155:. 1130:. 933:. 896:. 885:. 856:. 823:) 819:( 815:. 805:. 653:e 646:t 639:v 558:C 556:( 329:) 323:( 311:) 307:( 297:. 264:) 258:( 253:) 249:( 231:. 202:) 198:( 194:. 188:. 150:) 144:( 139:) 135:( 125:· 118:· 111:· 104:· 77:. 52:) 48:(

Index

improve it
talk page
Learn how and when to remove these messages

verification
improve this article
adding citations to reliable sources
"Dynamic recompilation"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
weasel words
biased
unverifiable
clarified or removed
original research
improve it
verifying
inline citations
Learn how and when to remove this message

lead section
summarize
provide an accessible overview
Learn how and when to remove this message
Program execution
Code

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.