摘要
在可重定目标编译器的设计与实现中,RTL中间表示具有内部的树结构表示形式和外部的正文表示形式的特性,使RTL适合作为可重定目标编译器中的中间表示。利用RTL的这种双重特性,提出适用于可重定目标编译器的代码生成技术,通过树模式匹配的方法建立中间表示与机器描述中指令模板的映射关系,实现汇编代码的输出。通过MD32Builder集成环境的构建,证明该技术简单易行。
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.
出处
《计算机工程》
CAS
CSCD
北大核心
2009年第11期13-15,19,共4页
Computer Engineering
基金
国家“863”计划基金资助项目(2007AA010302)
上海市科学技术委员会“嵌入式重大专项”基金资助项目(07DZ15001)
关键词
代码生成
树模式匹配
可重定目标编译器
中间表示
媒体处理器
code generation
tree pattern matching
retargetable compiler
intermediate representation
media processor