skip to main content
10.1145/3339186.3339192acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicppConference Proceedingsconference-collections
research-article

Translating AArch64 Floating-Point Instruction Set to the x86-64 Platform

Authors Info & Claims
Published:05 August 2019Publication History

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.)

References

  1. {n. d.}. musl. https://www.musl-libc.org/Google ScholarGoogle Scholar
  2. 2008. IEEE Standard for Floating-Point Arithmetic. IEEE Std 754-2008 (Aug 2008), 1--70.Google ScholarGoogle Scholar
  3. ARM 2013. ARM® Architecture Reference Manual ARMv8, for ARMv8-A architecture profile. ARM.Google ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. T. J. Dekker. 1971. A floating-point technique for extending the available precision. Numer. Math. 18, 3 (1971), 224--242. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. John R. Hauser. 1996. Handling Floating-point Exceptions in Numeric Programs. ACM Trans. Program. Lang. Syst. 18, 2 (March 1996), 139--174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. John R. Hauser. 2018. Berkeley SoftFloat. http://www.jhauser.us/arithmetic/SoftFloat.html.Google ScholarGoogle Scholar
  11. John R. Hauser. 2018. Berkeley SoftFloat Release 3e: Source Documentation. http://www.jhauser.us/arithmetic/SoftFloat-3/doc/SoftFloat-source.html.Google ScholarGoogle Scholar
  12. John L. Henning. 2006. SPEC CPU2006 Benchmark Descriptions. SIGARCH Comput. Archit. News 34, 4 (Sept. 2006), 1--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. LLVM. 2016. LLVM language reference manual. http://llvm.org/releases/3.7.1/docs/LangRef.html.Google ScholarGoogle Scholar
  16. Darek Mihocka. 2010. NO EXECUTE! http://www.emulators.com/docs/nx33_qemu_0125.htm.Google ScholarGoogle Scholar
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. QEMU. 2019. Features/Softfloat. https://wiki.qemu.org/Features/Softfloat.Google ScholarGoogle Scholar
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarCross RefCross Ref
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Translating AArch64 Floating-Point Instruction Set to the x86-64 Platform

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Other conferences
            ICPP Workshops '19: Workshop Proceedings of the 48th International Conference on Parallel Processing
            August 2019
            241 pages
            ISBN:9781450371964
            DOI:10.1145/3339186

            Copyright © 2019 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 5 August 2019

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed limited

            Acceptance Rates

            Overall Acceptance Rate91of313submissions,29%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader