›› 2014, Vol. 27 ›› Issue (5): 123-.

• Articles • Previous Articles     Next Articles

Research on and Implement of Code Generation for 32-bit MIPS Processor

YIN Juan,SUN Qiaozhi   

  1. (College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 210016,China)
  • Online:2014-05-15 Published:2014-05-14


Based on LCC compiler and embedded system 32-bit MIPS processor,this paper implements the LCC successful transplantation on the target machine MIPS processor.In order to quickly and effectively generate code generator,according to a new target machine features,the original macro assembly instructions area modified through splitting instructions and transforming between instructions,and then the machine description file is rewritten such that the generated object code has smaller instruction set and more compact structure.The opcode of object code is reduced by about 50% and the translation from the C code into assembly code is successfully done and passes the validation of MIPS simulator PCSPIM,while the performance is greatly improved.Finally,the machine code is generated using the assembler to verify the machine code on Xilinx ISE built-in simulation software (ISim) with a successful transplantation of LCC onto MIPS processors.

Key words: MIPS;LCC;code generator;PCSPIM;assembler;ISim

CLC Number: 

  • TP311.54