首页> 中文期刊> 《计算机技术与发展》 >堆栈处理器代码生成器的设计与实现

堆栈处理器代码生成器的设计与实现

         

摘要

堆栈处理器是一种面向嵌入式控制领域的处理器,其执行过程不依赖于通用寄存器而是硬件堆栈。文中以一款基于FPGA设计的16位堆栈处理器为平台,研究如何将一个C源代码转换成能够被目标处理器汇编器识别的汇编指令。为了能够迅速有效地实现代码生成器,文中选用LCC。 LCC是一款可变目标的C编译器,通过重新书写目标处理器的描述文件,LCC可以生成特定处理器的汇编指令。文章的最后通过一个简单的测试证明了C语言是可以移植到堆栈处理器上的。%Stack processor is a processor facing to the field of embedded control,and its implementation process does not depend on gener-al register but hardware stack. Take the 16 stack processor based on FPGA as the platform,research how a C source code can be converted into assembly instruction by target processor assembler recognition. In order to quickly and effectively achieve the code generator,choose LCC. LCC is one variable target C compiler,through rewriting the description file of the target processor,LCC can generate a particular processor assembly instruction. Finally through a simple test proved that C language can be transplanted to stack on the processor.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号