Research and Development of Compiler Based on GCC

  • Wang Xiaowei
  • Wang Kuixing
  • Yang Quansheng
Part of the Lecture Notes in Electrical Engineering book series (LNEE, volume 126)


Open-source GCC compiler has the advantage of high-level optimization ability and portability. Aiming at specific target platform, this paper carried out practical research and development of compiler based on GCC. Through analysis and research, this paper presented a thought: taking the analysis of RTL code as main direction to study RTL generation mechanisms and RTL code matching principles, which helps to understand the overall architecture of GCC and retargeting mechanisms of GCC. Through GCC porting practice, methods to modify the machine description for some typical instructions were presented. In the end, the generated compiler was tested by a basic C program to verify its correctness. This paper has guiding significance and reference value for understanding of compilers, GCC research, porting and optimization.


Syntax Tree Assembly Code Typical Instruction Branch Instruction Target Machine 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    GCC Administrator, Using and Porting the GNU Compiler Collection(GCC) (October 2001)Google Scholar
  2. 2.
    Nisson, H.-P.: Porting GCC for Dunces (May 2000)Google Scholar
  3. 3.
    Peng, L., Liu, Y., Li, Z.: Analysis of Porting GCC for Control Transfer StructureGoogle Scholar
  4. 4.
    Ren, S., Zhao, K., Zhao, X.: The Intermediate Language and theBack-End Information Translation in GCC. Computer Engineering and Science 02, 74–82 (1995)Google Scholar
  5. 5.
    Stallman, R.: GNU Compiler Collection Internals,
  6. 6.
    Wu, K., Ren, X., Li, R., Li, L.: Study and implementation of porting GCC to Nios. EI Journal of Hunan University(Natural Sciences) 34, 70–73 (2007)Google Scholar
  7. 7.
    Yang, Q., Wang, X., Zhai, Y.: Integrated Curriculum Design Of Computer Systems. Tsinghua University Press (October 2008)Google Scholar
  8. 8.
    Yang, Q., Li, Z.: Minisys2 Instruction Set Quick Reference (unpublished)Google Scholar
  9. 9.
    Zhao, K., Shen, Z.: GCC’s Support to Multi-target Compiler Technology. Computer Engineering and Applications 32, 50–55 (1996)Google Scholar

Copyright information

© Springer-Verlag GmbH Berlin Heidelberg 2012

Authors and Affiliations

  1. 1.School of Computer Science & EngineeringSoutheast UniversityNanjingChina

Personalised recommendations