摘要
新兴架构RISC-V的生态建设需要将其他架构函数或软件包向RISC-V架构迁移适配。在研究GCC特定架构适配的built-in函数向RISC-V架构迁移时,提出一套x86到RISC-V的built-in函数转换方法,对于非扩展指令集(属非向量类型)built-in函数,采用RISC-V架构下相同功能的built-in或标准库函数替代;对于SSE扩展指令集built-in函数,建立数据类型映射和向量函数操作映射实现向RISC-V架构向量扩展函数或标准库函数的迁移,其中RVV函数迁移方式占比67%。实验结果表明:方法迁移的程序功能正确,方法有效。本文方法对其他扩展指令集built-in函数的迁移提供了指导,且与现有工作相比,更易扩展、覆盖面更广。
The construction of the ecosystem for the emerging RISC-V architecture requires the adaptation and migration of functions or software packages from other architectures to RISC-V.In the study of migrating GCC-specific built-in functions to the RISC-V architecture,a method for converting x86 built-in functions to RISC-V was proposed.For non-extension instruction set built-in functions(which belong to non-vector types),functions with the same functionality in the RISC-V architecture or standard library functions were used as replacements.Concerning SSE extension instruction set built-in functions,the migration involves establishing data type mappings and vector function operation mappings to achieve the transition to RISC-V architecture s vector extension functions or standard library functions.Notably,the migration via RVV functions constitutes 67%of the overall approach.Experimental results demonstrate the correctness of program functionality and the efficacy of the proposed method.Additionally,this method provides guidance for the migration of built-in functions from other extension instruction sets,offering broader coverage and enhanced scalability compared to existing approaches.
作者
丁志远
朱家鑫
吴国全
王伟
DING Zhiyuan;ZHU Jiaxin;WU Guoquan;WANG Wei(School of Computer,Electronics and Information,Guangxi University,Nanning 530004,China;Technology Center of Software Engineering,Institute of Software Chinese Academy of Sciences,Beijing 100190,China)
出处
《广西大学学报(自然科学版)》
CAS
北大核心
2024年第3期620-636,共17页
Journal of Guangxi University(Natural Science Edition)
基金
中国科学院战略性先导科技专项(XDA0320000)
国家自然科学基金联合基金项目(U20A6003)。