摘要
在对IA-64二进制代码进行翻译的过程中,一个重要的问题就是识别和恢复通过跳转表实现的switch语句。分析了编译器生成跳转表时采用的策略,提出了前向预取同反向切片及表达式置换相结合以识别和恢复switch语句的技术,归纳了用于获取跳转表地址的规格化形式,给出了跳转表分支目标地址恢复方法,从而可将包含跳转表的IA-64二进制代码恢复为高级switch语句。该技术已经在二进制翻译框架I2A上进行了测试,可以处理编译器gcc 2.96及gcc 3.2.3在多种优化级别下生成的IA-64代码。
In the translation of IA-64 binary code, one of the important problems is that of recognizing the switch statements implemented via jump table, The paper first analyzes the compiler's strategies when creating jump table, then presents a technique for recognizing and recovering switch statements by combination of forward prefetch and backwards slicing plus expression substitution, reduces to a normal form which allows people to determine where the jump table is located, proposes a method to recovery the target addresses of jump table. Using such a technique, it can translate the IA-64 binary code that contains jump table into high level switch statements. The presented technique is tested in a binary translation framework I2A. The test shows that the technique is suitable for IA-64 binary code generated by compiler gcc 2.96 and gcc 3.2.3 with multi optimization options.
出处
《计算机工程》
EI
CAS
CSCD
北大核心
2006年第23期49-51,共3页
Computer Engineering
基金
国防科研基金资助重点项目