A Retargetable Static Binary Translator for the ARM Architecture

被引:18
|
作者
Shen, Bor-Yeh [1 ]
Hsu, Wei-Chung [1 ]
Yang, Wuu [1 ]
机构
[1] Natl Chiao Tung Univ, Dept Comp Sci, Hsinchu 30010, Taiwan
关键词
Design; Languages; Performance; Binary translation; compiler; retargeting; intermediate representation;
D O I
10.1145/2629335
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Machines designed with new but incompatible Instruction Set Architecture (ISA) may lack proper applications. Binary translation can address this incompatibility by migrating applications from one legacy ISA to a new one, although binary translation has problems such as code discovery for variable-length ISA and code location issues for handling indirect branches. Dynamic Binary Translation (DBT) has been widely adopted for migrating applications since it avoids those problems. Static Binary Translation (SBT) is a less general solution and has not been actively researched. However, SBT performs more aggressive optimizations, which could yield more compact code and better code quality. Applications translated by SBT can consume less memory, processor cycles, and power than DBT and can be started more quickly. These advantages are even more critical for embedded systems than for general systems. In this article, we designed and implemented a new SBT tool, called LLBT, which translates ARM instructions into LLVM IRs and then retargets the LLVM IRs to various ISAs, including x86, x86-64, ARM, and MIPS. LLBT leverages two important functionalities from LLVM: comprehensive optimizations and retargetability. More importantly, LLBT solves the code discovery problem for ARM/Thumb binaries without resorting to interpretation. LLBT also effectively reduced the size of the address mapping table, making SBT a viable solution for embedded systems. Our experiments based on the EEMBC benchmark suite show that the LLBT-generated code can run more than 6x and 2.3x faster on average than emulation with QEMU and HQEMU, respectively.
引用
收藏
页码:87 / 111
页数:25
相关论文
共 50 条
  • [1] Design of a resourceable and retargetable binary translator
    Cifuentes, Cristina
    Van Emmerik, Mike
    Ramsey, Norman
    [J]. Reverse Engineering - Working Conference Proceedings, 1999, : 280 - 291
  • [2] Binary translation: Static, dynamic, retargetable?
    Cifuentes, C
    Malhotra, V
    [J]. INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 1996, : 340 - 349
  • [3] Static Binary Code Instrumentation for ARM Architecture
    Ermakov, Mikhail
    [J]. PERSPECTIVES OF SYSTEM INFORMATICS, PSI 2017, 2018, 10742 : 105 - 116
  • [4] Efficient and retargetable SIMD translation in a dynamic binary translator
    Fu, Sheng-Yu
    Hong, Ding-Yong
    Liu, Yu-Ping
    Wu, Jan-Jan
    Hsu, Wei-Chung
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2018, 48 (06): : 1312 - 1330
  • [5] DisIRer: Converting a Retargetable Compiler into a Multiplatform Binary Translator
    Hwang, Yuan-Shin
    Lin, Tzong-Yen
    Chang, Rong-Guey
    [J]. ACM TRANSACTIONS ON ARCHITECTURE AND CODE OPTIMIZATION, 2010, 7 (04)
  • [6] ITA: A Static Binary Translator
    Ning, Qi
    [J]. ITESS: 2008 PROCEEDINGS OF INFORMATION TECHNOLOGY AND ENVIRONMENTAL SYSTEM SCIENCES, PT 2, 2008, : 276 - 284
  • [7] Efficient Dual-ISA Support in a Retargetable, Asynchronous Dynamic Binary Translator
    Spink, Tom
    Wagstaff, Harry
    Franke, Bjorn
    Topham, Nigel
    [J]. Proceedings International Conference on Embedded Computer Systems - Architectures, Modeling and Simulation (SAMOS XV), 2015, : 103 - 112
  • [8] Retargetable binary utilities
    Abbaspour, M
    Zhu, JW
    [J]. 39TH DESIGN AUTOMATION CONFERENCE, PROCEEDINGS 2002, 2002, : 331 - 336
  • [9] Translating the ARM Neon and VFP instructions in a binary translator
    Guo, Yu-Chuan
    Yang, Wuu
    Chen, Jiunn-Yeu
    Lee, Jenq-Kuen
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2016, 46 (12): : 1591 - 1615
  • [10] LLBT: An LLVM-based Static Binary Translator
    Shen, Bor-Yeh
    Chen, Jiunn-Yeu
    Hsu, Wei-Chung
    Yang, Wuu
    [J]. CASES'12: PROCEEDINGS OF THE 2012 ACM INTERNATIONAL CONFERENCE ON COMPILERS, ARCHITECTURES AND SYNTHESIS FOR EMBEDDED SYSTEMS, 2012, : 51 - 60