ABSTRACT
Binary translation translates binary programs from one instruction set to another. It is widely used in virtual machines and emulators. We extend mc2llvm, which is an LLVM-based retargetable 32-bit binary translator developed in our lab in the past several years, to support 64-bit ARM instruction set. In this paper, we report the translation of AArch64 floating-point instructions in our mc2llvm. For floating-point instructions, due to the lack of floating-point support in LLVM [13, 14], we add support for the flush-to-zero mode, not-a-number processing, floating-point exceptions, and various rounding modes. On average, mc2llvm-translated binary can achieve 47% and 24.5% of the performance of natively compiled x86-64 binary on statically translated EEMBC benchmark and dynamically translated SPEC CINT2006 benchmarks, respectively. Compared to QEMU-translated binary, mc2llvm-translated binary runs 2.92x, 1.21x and 1.41x faster on statically translated EEMBC benchmark, dynamically translated SPEC CINT2006, and CFP2006 benchmarks, respectively. (Note that the benchmarks contain both floating-point instructions and other instructions, such as load and store instructions.)
- {n. d.}. musl. https://www.musl-libc.org/Google Scholar
- 2008. IEEE Standard for Floating-Point Arithmetic. IEEE Std 754-2008 (Aug 2008), 1--70.Google Scholar
- ARM 2013. ARM® Architecture Reference Manual ARMv8, for ARMv8-A architecture profile. ARM.Google Scholar
- Fabrice Bellard. 2005. QEMU, a Fast and Portable Dynamic Translator. In Proceedings of the Annual Conference on USENIX Annual Technical Conference (ATEC '05). USENIX Association, Berkeley, CA, USA, 41--41. http://dl.acm.org/citation.cfm?id=1247360.1247401 Google ScholarDigital Library
- Jiunn-Yeu Chen, Wuu Yang, Wei-Chung Hsu, Bor-Yeh Shen, and Quan-Huei Ou. 2017. On Static Binary Translation of ARM/Thumb Mixed ISA Binaries. ACM Trans. Embed. Comput. Syst. 16, 3, Article 81 (March 2017), 25 pages. Google ScholarDigital Library
- Jiunn-Yeu Chen, Wuu Yang, Bor-Yeh Shen, Yuan-Jia Li, and Wei-Chung Hsu. 2015. Automatic Validation for Binary Translation. Comput. Lang. Syst. Struct. 43, C (Oct. 2015), 96--115. Google ScholarDigital Library
- T. J. Dekker. 1971. A floating-point technique for extending the available precision. Numer. Math. 18, 3 (1971), 224--242. Google ScholarDigital Library
- Yu-Chuan Guo, Wuu Yang, Jiunn-Yeu Chen, and Jenq-Kuen Lee. 2016. Translating the ARM Neon and VFP instructions in a binary translator. Software: Practice and Experience 46, 12 (2016), 1591--1615. Google ScholarDigital Library
- John R. Hauser. 1996. Handling Floating-point Exceptions in Numeric Programs. ACM Trans. Program. Lang. Syst. 18, 2 (March 1996), 139--174. Google ScholarDigital Library
- John R. Hauser. 2018. Berkeley SoftFloat. http://www.jhauser.us/arithmetic/SoftFloat.html.Google Scholar
- John R. Hauser. 2018. Berkeley SoftFloat Release 3e: Source Documentation. http://www.jhauser.us/arithmetic/SoftFloat-3/doc/SoftFloat-source.html.Google Scholar
- John L. Henning. 2006. SPEC CPU2006 Benchmark Descriptions. SIGARCH Comput. Archit. News 34, 4 (Sept. 2006), 1--17. Google ScholarDigital Library
- Chris Lattner. 2002. LLVM: An Infrastructure for Multi-Stage Optimization. Master's thesis. Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL. See http://llvm.cs.uiuc.edu.Google Scholar
- Chris Lattner and Vikram Adve. 2004. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO'04). Palo Alto, California. Google ScholarDigital Library
- LLVM. 2016. LLVM language reference manual. http://llvm.org/releases/3.7.1/docs/LangRef.html.Google Scholar
- Darek Mihocka. 2010. NO EXECUTE! http://www.emulators.com/docs/nx33_qemu_0125.htm.Google Scholar
- Andres Nötzli and Fraser Brown. 2016. LifeJacket: Verifying Precise Floating-point Optimizations in LLVM. In Proceedings of the 5th ACM SIGPLAN International Workshop on State Of the Art in Program Analysis (SOAP 2016). ACM, New York, NY, USA, 24--29. Google ScholarDigital Library
- QEMU. 2019. Features/Softfloat. https://wiki.qemu.org/Features/Softfloat.Google Scholar
- Eric M. Schwarz, Martin Schmookler, and Son Dao Trong. 2003. Hardware Implementations of Denormalized Numbers. In Proceedings of the 16th IEEE Symposium on Computer Arithmetic (ARITH-16'03) (ARITH '03). IEEE Computer Society, Washington, DC, USA, 70--. http://dl.acm.org/citation.cfm?id=786450.786618 Google ScholarDigital Library
- Bor-Yeh Shen, Jiunn-Yeu Chen, Wei-Chung Hsu, and Wuu Yang. 2012. LLBT: An LLVM-based Static Binary Translator. In Proceedings of the 2012 International Conference on Compilers, Architectures and Synthesis for Embedded Systems (CASES '12). ACM, New York, NY, USA, 51--60. Google ScholarDigital Library
- Bor-Yeh Shen, Wei-Chung Hsu, and Wuu Yang. 2014. A Retargetable Static Binary Translator for the ARM Architecture. ACM Trans. Archit. Code Optim. 11, 2, Article 18 (June 2014), 25 pages. Google ScholarDigital Library
- Bor-Yeh Shen, Jyun-Yan You, Wuu Yang, and Wei-Chung Hsu. 2012. An LLVM-based hybrid binary translation system.. In SIES. IEEE, 229--236. http://dblp.unitrier.de/db/conf/sies/sies2012.html#ShenYYH12Google ScholarCross Ref
- Richard L. Sites, Anton Chernoff, Matthew B. Kirk, Maurice P. Marks, and Scott G. Robinson. 1993. Binary Translation. Commun. ACM 36, 2 (Feb. 1993), 69--81. Google ScholarDigital Library
- Jim Smith and Ravi Nair. 2005. Virtual Machines: Versatile Platforms for Systems and Processes (The Morgan Kaufmann Series in Computer Architecture and Design). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA. Google ScholarDigital Library
Index Terms
- Translating AArch64 Floating-Point Instruction Set to the x86-64 Platform
Recommendations
Low overhead dynamic binary translation on ARM
PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and ImplementationThe ARMv8 architecture introduced AArch64, a 64-bit execution mode with a new instruction set, while retaining binary compatibility with previous versions of the ARM architecture through AArch32, a 32-bit execution mode. Most hardware implementations ...
Hyperchaining Optimizations for an LLVM-Based Binary Translator on x86-64 and RISC-V Platforms
ICPP Workshops '21: 50th International Conference on Parallel Processing WorkshopRabbit is an LLVM-based hybrid binary translator with many diverse optimizations to improve the performance. In addition to platform-independent hyperchaining (indep), Rabbit also includes platform-dependent hyperchaining (dep) on both x86-64 and RISC-V ...
Hyperchaining for LLVM-Based Binary Translators on the x86-64 Platform
AbstractRabbit is an LLVM-based hybrid binary translator with several innovative optimizations (including an extension to traditional block chaining, called hyperchaining) to improve the performance. In addition to platform-independent hyperchaining (...
Comments