@article{oai:ipsj.ixsq.nii.ac.jp:00231992, author = {Changbin, Chen and Shu, Sugita and Yotaro, Nada and Hidetsugu, Irie and Shuichi, Sakai and Ryota, Shioya and Changbin, Chen and Shu, Sugita and Yotaro, Nada and Hidetsugu, Irie and Shuichi, Sakai and Ryota, Shioya}, issue = {1}, journal = {情報処理学会論文誌プログラミング(PRO)}, month = {Jan}, note = {Porting a compilation toolchain to a new platform is not an easy task. One of the reasons is we need to also port supporting libraries like the C standard library simultaneously, which make extensive use of platform-dependent assembly code. Binary translation is a popular solution to this problem. By translating a binary file compiled for a guest platform directly to another host platform, binary translation is suitable for research and fast prototyping without a complete compilation toolchain. A static binary translator performs all translation work in the compile time for maximum performance and minimum runtime dependencies, but it often fails on irregular indirect jumps whose targets cannot be fully determined statically. A dynamic/hybrid binary translator overcomes this issue by performing runtime translation, but it is in general slower and the complex runtime system hinders its portability. In this presentation we propose a hybrid binary translator that can progressively improve its performance through three different translation levels when provided with more input information. Specifically, this translator utilizes the symbol table and the source code to restrict the effect of indirect jumps and boost the performance of hot spot functions. The proposed translator is able to translate statically linked RISC-V Linux binaries to self-contained LLVM IR. Experiments show it can correctly translate the highly complex SPEC CPU 2017 benchmark package. Comparing with the state-of-the-art dynamic binary translator QEMU, it is 1.509x and 4.359x faster on integer and floating-point benchmark suites respectively., Porting a compilation toolchain to a new platform is not an easy task. One of the reasons is we need to also port supporting libraries like the C standard library simultaneously, which make extensive use of platform-dependent assembly code. Binary translation is a popular solution to this problem. By translating a binary file compiled for a guest platform directly to another host platform, binary translation is suitable for research and fast prototyping without a complete compilation toolchain. A static binary translator performs all translation work in the compile time for maximum performance and minimum runtime dependencies, but it often fails on irregular indirect jumps whose targets cannot be fully determined statically. A dynamic/hybrid binary translator overcomes this issue by performing runtime translation, but it is in general slower and the complex runtime system hinders its portability. In this presentation we propose a hybrid binary translator that can progressively improve its performance through three different translation levels when provided with more input information. Specifically, this translator utilizes the symbol table and the source code to restrict the effect of indirect jumps and boost the performance of hot spot functions. The proposed translator is able to translate statically linked RISC-V Linux binaries to self-contained LLVM IR. Experiments show it can correctly translate the highly complex SPEC CPU 2017 benchmark package. Comparing with the state-of-the-art dynamic binary translator QEMU, it is 1.509x and 4.359x faster on integer and floating-point benchmark suites respectively.}, pages = {17--17}, title = {A High-performance Hybrid Binary Translator using Source-level Information}, volume = {17}, year = {2024} }