计算机工程与应用 ›› 2007, Vol. 43 ›› Issue (1): 74-74.

• 学术探讨 • 上一篇    下一篇

反投机技术研究

孙维新,赵荣彩,苏铭,齐宁   

  1. 信息工程学院一系研究生队
  • 收稿日期:2006-01-17 修回日期:1900-01-01 出版日期:2007-01-01 发布日期:2007-01-01
  • 通讯作者: 孙维新 sunweixin

A Study on Unspeculation Techniques

WeiXin Sun,,,   

  1. 信息工程学院一系研究生队
  • Received:2006-01-17 Revised:1900-01-01 Online:2007-01-01 Published:2007-01-01
  • Contact: WeiXin Sun

摘要: 投机优化技术作为一种先进的现代编译技术,有效的提高了指令执行的并行性。然而,在逆向工程中,有时要实现代码的跨平台移植,而投机优化技术又受硬件平台的制约;有时需要优化代码的结构,使程序的逻辑结构易于理解;这些都要求消除这种与硬件息息相关的优化技术。本文基于IA-64平台,提出了一种反投机处理算法,对ICC 编译器编译后的可执行二进制代码进行处理,消除代码中的投机优化,将其转换成等价的没有投机优化的指令序列,这样使反投机后的代码更容易理解,而且在逆向工程中摆脱了硬件的限制。测试表明该反投机技术可以对ICC编译后的代码进行有效处理。

关键词: 投机, 反投机, 控制流图, 软件流水

Abstract: Speculation is a very effective way to improve instruction level parallelism as an advance compiler optimization technique. However, in reverse direction engineering, sometimes we need to migrate code between different hardware plats, sometimes need to optimize the structure of the binary program for understanding. These all ask to transform speculative code into “normal” unspeculative code. This paper describes the algorithm based on the IA-64 hardware plat. The original binary code is compiled by ICC compiler, and the result code is the assemble code without speculative code. This translation must preserve the program semantics, and the running result is unchanged. This technique can be used in traditional reverse engineering and re-engineering techniques. Experiments indicate that the technique is very effective in eliminating the speculative code in binary code that is compiled by ICC compiler.

Key words: speculation, unspeculation, CFG, software pipelining