An assistance tool employing a systematic methodology for GCC retargeting
Article first published online: 27 JAN 2011
Copyright © 2011 John Wiley & Sons, Ltd.
Software: Practice and Experience
Volume 42, Issue 1, pages 19–36, January 2012
How to Cite
Lin, K.-W. and Chen, P.-S. (2012), An assistance tool employing a systematic methodology for GCC retargeting. Softw: Pract. Exper., 42: 19–36. doi: 10.1002/spe.1045
- Issue published online: 27 DEC 2011
- Article first published online: 27 JAN 2011
- Manuscript Accepted: 21 NOV 2010
- Manuscript Revised: 6 NOV 2010
- Manuscript Received: 24 AUG 2009
- machine description
GCC (GNU Compiler Collection) is a popular compiler because it is open source, generates high-quality code, and is portable. The emergence of various embedded systems has led to considerable interest in the portability of GCC. For GCC, a source programming language is parsed and internally transferred to the corresponding intermediate representation, RTL (Register Transfer Language). A machine description (MD)file, which describes the mapping relationships between RTL and the corresponding target assembly instructions, is provided at the stage of code generation. Therefore, GCC retargeting requires the construction of a target MD file. However, it is difficult for developers to understand and construct the MD because this requires considerable time spent studying the GCC intermediate representation and the strategy of code generation. In this paper, we propose a systematic methodology to help developers in retargeting GCC. The entire process is divided into seven levels according to the features of the supported source programming language. Based on this systematic methodology, a Web-based assistance tool is also developed to guide developers through the retargeting. The assistance tool operates like a wizard to provide developers with the necessary procedures at each level and then generates the corresponding GCC files. Finally, we demonstrate the utility and practicality of the assistance tool based on the proposed methodology by applying it to the retargeting of GCC to a 32-bit embedded processor—the helper function unit of the UniCore VisoMT processor, as developed by the System-on-Chips (SoC) Research Center of National Chung Cheng University, Taiwan. Copyright © 2011 John Wiley & Sons, Ltd.