作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2009, Vol. 35 ›› Issue (11): 13-15,1. doi: 10.3969/j.issn.1000-3428.2009.11.005

• 博士论文 • 上一篇    下一篇

面向媒体处理器可重定目标编译器的代码生成

琚小明1,张 召1,史 册2   

  1. (1. 华东师范大学软件学院,上海 200062;2. 浙江大学信息学院,杭州 310027)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2009-06-05 发布日期:2009-06-05

Code Generation of Retargetable Compiler for Media Processor

JU Xiao-ming1, ZHANG Zhao1, SHI Ce2   

  1. (1. Institute of Software Engineering, East China Normal University, Shanghai 200062; 2. Information Institute, Zhejiang University, Hangzhou 310027)
  • Received:1900-01-01 Revised:1900-01-01 Online:2009-06-05 Published:2009-06-05

摘要: 在可重定目标编译器的设计与实现中,RTL中间表示具有内部的树结构表示形式和外部的正文表示形式的特性,使RTL适合作为可重定目标编译器中的中间表示。利用RTL的这种双重特性,提出适用于可重定目标编译器的代码生成技术,通过树模式匹配的方法建立中间表示与机器描述中指令模板的映射关系,实现汇编代码的输出。通过MD32Builder集成环境的构建,证明该技术简单易行。

关键词: 代码生成, 树模式匹配, 可重定目标编译器, 中间表示, 媒体处理器

Abstract: In the design and implementation of a retargetable compiler, RTL is suitable for intermediate representation for retargetable complier, because of its two particular forms, namely internal tree structure and external text expression. Based on double characteristic of RTL, this paper proposes a technique of code generation which is suitable for the design and implementation of retaragetable compiler. By means of tree pattern matching, the mapping relationship of intermediate representation and instruction tree pattern in machine description is built, and the assembly code is generated. With building integrated development environment MD32Builder, it is proved that this technique is easy and feasible.

Key words: code generation, tree pattern matching, retargetable compiler, intermediate representation, media processor

中图分类号: