Font Size: a A A

Design And Implementation Of An ARM To RISC-V Assembly Code Migration Tool Based On Instruction Mapping

Posted on:2024-08-29Degree:MasterType:Thesis
Country:ChinaCandidate:J C JiaFull Text:PDF
GTID:2568307145989339Subject:Computer technology
Abstract/Summary:PDF Full Text Request
RISC-V,as a reduced instruction set computer architecture with modular design,has many advantages,such as simplicity,openness,reliability and support for multiple platforms.By adopting open standards cooperation,a new path has been opened up for processor design and innovation.Due to the independence of open source technology from any company or country,RISCV provides an opportunity for China to achieve independent and controllable processors.A complete,stable and sustainable software ecosystem can improve the user experience and promote the promotion and development of instruction set architecture.However,RISC-V,as a new instruction set architecture,its software ecosystem is not rich enough and needs further construction.In the process of building the software ecosystem,it is necessary to migrate software from other architectures to the RISC-V architecture.Although most of the existing software is written in high-level programming language,because assembly language has advantages in controlling hardware capability and execution efficiency,there is software containing assembly source program.However,assembly language has poor portability,relying heavily on manual migration.There are drawbacks such as high labor costs,low accuracy,low migration efficiency,and high technical barriers.Moreover,existing auxiliary tools suffer from various issues such as instruction translation errors and limited instruction support,such as atomic instructions,system call instructions,etc.Therefore,there is an urgent need to develop new and accurate,scalable assembly migration auxiliary tools.To address the issue of manual assembly source code migration,this article investigates an instruction mapping based assembly translation method,which mainly includes(1)analyzing the differences between 64-bit ARM architecture and RISC-V architecture assembly,and proposing corresponding modification strategies for each part of the migration process.(2)Based on the differences between the assembly instructions of the two architectures,an instruction mapping dictionary was designed.Using this dictionary,both a function assembly translation method and an inline assembly translation method were developed.Register allocation is also carried out according to the application binary interface specification,fully utilizing the registers of RISC-V and ensuring the accuracy of translation.This design form achieves loose coupling between instruction mapping relationships and other modules of the tool,thereby improving the scalability of the tool.Based on the above method,an instruction mapping based ARM to RISCV assembly code migration tool was designed and implemented to assist in the migration of 64 bit ARM architecture to RISC-V architecture assembly source code.The experimental results indicate that compared to existing tools,this tool is more easily expandable,supports a greater variety of instruction types,and provides both function assembly translation and inline assembly translation.Additionally,it offers a visual representation of the instruction mapping relationships.
Keywords/Search Tags:RISC-V, ARM, Assembly Language, Software Migration
PDF Full Text Request
Related items