Translating AArch64 Floating-Point Instruction Set to the x86-64 Platform
Translating AArch64 Floating-Point Instruction Set to the x86-64 Platform
Yi-Ping You,Tsung-Chun Lin,Wuu Yang
TLDR
This paper extends mc2llvm, which is an LLVM-based retargetable 32-bit binary translator developed in the lab in the past several years, to support 64-bit ARM instruction set and adds support for the flush-to-zero mode, not-a-number processing, floating-point exceptions, and various rounding modes.
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.)
