动态二进制翻译中全寄存器直接映射方法  被引量:13

ALL REGISTERS DIRECT MAPPING METHOD IN DYNAMIC BINARY TRANSLATION

在线阅读下载全文

作  者:廖银[1] 孙广中[1] 姜海涛[1] 靳国杰[2] 陈国良[1] 

机构地区:[1]中国科学技术大学计算机科学与技术学院,安徽合肥230027 [2]中国科学院计算技术研究所,北京100190

出  处:《计算机应用与软件》2011年第11期21-24,48,共5页Computer Applications and Software

基  金:国家自然科学基金(61033009);工信部"核心电子器件;高端通用芯片及基础软件产品"科技重大专项(2009ZX 01028-002-003)

摘  要:二进制翻译是不同体系结构之间软件移植的重要手段。体系结构和硬件环境上的差别,可以通过二进制翻译系统来弥补,在翻译过程中往往使用多条本地指令模拟一条目标指令,翻译代码规模随之显著增加,从而导致被翻译程序的执行效率下降。寄存器作为处理器和内存交换信息的重要存储部件,寄存器的模拟器方式对于程序的性能有着至关重要的影响。为了提高特定平台翻译后代码的执行效率,提出了在动态二进制翻译机制中使用全部寄存器直接映射方法,详细分析了二进制翻译中的上下文切换原理和寄存器访问范围,为异构平台之间寄存器直接映射提供方法指导。利用QEMU模拟器,把x86架构的8个通用寄存器全部的直接映射到MIPS架构的对应寄存器,在此基础上,进行大量的指令翻译规则的简化。实验数据表明,该方法可以有效简化指令翻译,降低代码膨胀率,使得SPEC CINT 2000测试程序在龙芯CPU上翻译后代码运行时间下降了30%-40%。Binary translation is an important means of software migration between different architectures. The differences in architectures and hardware environments are possible to be made up through binary translation system. In the process of translation, it always uses multiple local instructions to simulate a single target instruction. Thus the amount of code translation will increase significantly, which leads to decrease of execution efficiency of the translated program. Register is a key storage component to exchange information between CPU and memory. The way to simulate the registers has a critical influence on the performance of the program. In order to improve the execution efficiency of the platform-specific codes translated, this paper proposes a method that maps directly all the target host registers to the local host registers in dynamic binary translation mechanics. The principle of the context switch and the access scope of registers in binary translation are analysed in detail for providing the guidance to the direct mapping of registers between heterogeneous platforms. Using QEMU emulator, the method maps 8 general-purpose registers on x86 architecture to corresponding registers on MIPS architecture directly. And large quantity translation rules of instructions are simplified based on this mapping. Experiment data show that this method can effectively simplify the instruction translation and decrease the code inflation rate. It reduces 30% - 40% of the running time of the codes of SPEC CINT. 2000 test program translated on the Loongson CPU platform.

关 键 词:动态二进制翻译 寄存器映射 x86体系结构 MIPS体系结构 QEMU 

分 类 号:TP3[自动化与计算机技术—计算机科学与技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象