DSP指令生成与优化和二进制翻译是现代编译工具值得关注的热点问题.针对DSP指令的特点提出一种通用的DSP指令生成(支持VLIW指令)与二进制翻译技术,并应用于GNU汇编器(GAS).包含该技术的汇编器PCA(Post Compilation Assembler)先将输入的汇编指令转化成类似LISP的中间语言.PCA通过对此中间语言分析以及窥孔优化,最终生成高质量的目标平台DSP代码.%DSP code generation and optimization, along with binary translation, has become a well-concerning focus of the modern tool chain. This paper, on account of the specialties of DSP instruction,proposed a general method of DSP code generating (include VLIW) and binary translation, which applied in GNU assembler ( GAS). CAS with this technology (called PCA) first translates source assembly instructions into LISP-Iike intermediate representation (IR) ; by analyzing the behaviors of the IR statements and employing post-compilation techniques such as peephole optimization, PCA will produce DSP codes of high quality suitable for the target platform.
展开▼