Abstract:
Binary translation system is an across-architecture code migration system based on software, which translates binary codes of one architecture into those of another architecture. Binary translation is applied for not only the legacy code porting but also software being used in different hardware platform. The research on the binary translation has significance not only for legacy code migration but also for the program performance improvement and other aspects. How to dispose X86 FPU stack is one of the critical problems of research on binary translation whose source platform is X86, and it is also critical to the performance of binary translation whose source platform is X86. An extending virtual stack method has been presented. It makes sure that every floating register in every basic block which is referred by floating computing can directly be mapped to a target floating register using unifying method. It omits unnecessary judges in the entrance of every block using translation analysis, which ensures the effectiveness of translation. Besides, the necessary and sufficient conditions of floating register stack overflow and underflow have also been presented. It does goodness to generate more effective native code. It can dispose the problem of X86 float stack in binary translation successfully. The experiments show that this method can gain better performance without influencing the correctness of programs.