| 研究生: |
劉立林 Liu, Li-lin |
|---|---|
| 論文名稱: |
多來源與多目標之二元碼轉譯系統的設計與實作 Design and Implementation of A Resourceable and Retargetable Binary Translation Framework |
| 指導教授: |
周哲民
Jou, Jer-min |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 電機工程學系 Department of Electrical Engineering |
| 論文出版年: | 2007 |
| 畢業學年度: | 95 |
| 語文別: | 中文 |
| 論文頁數: | 64 |
| 中文關鍵詞: | 二元碼轉譯 |
| 外文關鍵詞: | binary translation, UQBT |
| 相關次數: | 點閱:37 下載:2 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
本篇論文以軟體的方式,發展一套靜態的二元碼轉譯系統,其最大的特性是可以藉由替換來源端與目的端平台的指令集描述檔,很容易地實現相容於多個來源端與多個目的端平台的特性。
這個系統的架構可分為前端、中端和後端三個部份,前端我們是藉由UQBT系統的前級去實現,它可以將一個可執行的程式轉為中間語言HRTL(High-level Register Transfer Lists);而本系統發展的中、後端與一般編譯器實作的方式相似,中端的部份由三個元件組成,字詞分析器會讀進前端輸出的中間語言HRTL,轉為一連串的基本單元編碼,送至語法分析器建構成一棵二元樹,再由二元樹優化器作最佳化;後端的部份由二個元件組成,樣本比對器能從中端輸出的二元樹裡,找出可以被合併的指令,再由程式碼產生器輸出目標平台的組合語言碼。目前我們輸出ARM平台的組合語言程式碼,送至ARM Developer Suite (ADS)這套應用程式上作驗證,並將其輸出的結果與來源端的執行檔及原始C程式碼在ADS上模擬的結果作比較。
在近年來很熱門的虛擬機器(Virtual Machines)研究中,二元碼轉譯亦是其中一個重要的技術,我們也希望藉由這樣一個具彈性、多來源與多目標的二元碼轉譯系統實作,能更進一步涉獵虛擬機器這個領域。
In this paper we've developed a binary translation system, using static approach. That has the ability of resourceable and retargetable features.
This system can be divided into 3 parts, Front-end, Middle-end and Back-end. The front-end of UQBT system is adopted in our system that translates executable file into an intermediate language, HRTL (High-level Register Transfer Lists). Middle-end is composed of three components, Lexical Analyzer, Syntax Analyzer and Tree Optimizer. Lexical analyzer loads HRTL as input and translates it in a form of token-encoding. Then these token-encoding were delivered to Syntax Analyzer to create a binary tree. This binary tree will be optimized by Tree Optimizer. Middle-end is composed of two components, Pattern Matcher and Code Generator. Pattern Matcher looks for combinable instructions in binary tree and generates target assembly code via the Code Generator. Here, we take ARM as our ISA. The translated assembly code compared with source C code can be verified on ARM Developer Suite (ADS).
In recent years, virtual machine researches are rapidly growing in popularity, binary translation is one of its important techniques. We hope to dabble in the field of virtual machine by the research of resourceable and retargetable binary translation system.
[1] Erik R. Altman, Kemal Ebcioglu, Thomas J. Watson, "Full System Binary Translation: RISC to VLIW," IBM Research Report, Computer Science, March 2000, pp.1-21.
[2] Cristina Cifuentes, Vishv Malhotra, "Binary Translation: Static, Dynamic, Retargetable?," International Conference on Software Maintenance, 1996, pp.340-349.
[3] Cristina Cifuentes, Mike Van Emmerik, Norman Ramsey, Brian Lewis, "The University of Queenslan Binary Translator (UQBT) Framework," The University of Queensland and Sun Microsystems, 1996-2001.
[4] Cristina Cifuentes, Mike Van Emmerik, Norman Ramsey, "The Design of a Resourceable and Retargetable Binary Translator," Sixth Working Conference on Reverse Engineering, October, 1999, pp.280-292.
[5] Cristina Cifuentes, Mike Van Emmerik, "UQBT: Adaptable Binary Translation at Low Cost," IEEE Computer Society, vol. 33, no. 3, March, 2000, pp.60-66.
[6] Cristina Cifuentes, Mike Van Emmerik, Norman Ramsey, Brian Lewis, "Experience in the Design, Implementation and Use of a Retargetable Static Binary Translation Framework," Microsystems Laboratories, January, 2002.
[7] James C. Dehnert, Brian K. Grant, John P. Banning, Richard Johnson, Thomas Kistler, Alexander Klaiber, Jim Mattson, "The Transmeta Code Morphing™ Software: Using Speculation, Recovery, and Adaptive Retranslation to Address Real-Life Challenges," International Symposium on Code Generation and Optimization, 2003, pp.15-24.
[8] Kemal Ebcioglu, Erik R. Altman, Michael Gschwind, and Sumedh Sathaye, "Dynamic Binary Translation and Optimization," IEEE Trans. On Computers 50 (6), June 2001, pp.529-548.
[9] G. Hariprakash, R. Achutharaman, Amos R. Omondi, "Hardware compilation for high performance Java processors," School of Computer Engineering, Nanyang Technological University, Singapore.
[10] R. Leupers, O. Wahlen, M. Hohenauer, T. Kogel, P. Marweel, "An Executable Intermediate Representation for Retargetable Compilation and High-Level Code Optimization," Systems, Architectures, Modeling, and Simulation, 2003
[11] K. Scott, N. Kumar, S. Velusamy, B. Childers, J. W. Davidson, and M. L. Soffa, "Retargetable an Reconfigurable Software Dynamic Translation," International Symposium on Code Generation and Optimization, 2003, pp.36-47.
[12] James E. Smith, Ravi Nair, "VIRTUAL MACHINES Versatile Platforms For Systems and Processes," Morgan Kaufmann Publishers, March 2006.
[13] David Ung, Cristina Cifuentes, "Machine-Adaptable Dynamic Binary Translation," Dynamic and adaptive compilation and optimization, 2000, pp.41-51
[14] Brian F. Veale, John K. Antonio, Monte P. Tull, "Architectural Approaches for Dynamic Translation and Reconfiguration," Region 5 Conference: Annual Technical and Leadership Workshop, 2004, pp.49-58
[15] HP's Dynamo, http://arstechnica.com/reviews/1q00/dynamo/dynamo-1.html
[16] UQBT - A Resourceable and Retargetable Binary Translator, http://www.itee.uq.edu.au/~cristina/uqbt.html
[17] 蔡宜穎,以軟體實現的動態二進制轉譯系統,國立成功大學電機工程學系,碩士論文,2003