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

计算机工程

• 开发研究与工程应用 • 上一篇    下一篇

基于CK810 处理器的汇编链接时优化

胡 敏,卢永江,刘 兵   

  1. (浙江大学超大规模集成电路设计研究所,杭州310027)
  • 收稿日期:2013-10-25 出版日期:2014-11-15 发布日期:2014-11-13
  • 作者简介:胡 敏(1987 - ),男,硕士,主研方向:嵌入式系统;卢永江,副教授、博士;刘 兵,硕士研究生。
  • 基金资助:
    国家“863”计划基金资助项目(2009AA011706)。

Assembly and Link Time Optimization Based on CK810 Processor

HU Min,LU Yongjiang,LIU Bing   

  1. (Institute of Very Large Scale Integrated Circuits Design,Zhejiang University,Hangzhou 310027,China)
  • Received:2013-10-25 Online:2014-11-15 Published:2014-11-13

摘要: 提出基于CK810 处理器的16/ 32 位混编指令集汇编链接时优化技术。利用汇编输出二进制文件,根据CK810 处理器的16/ 32 位混编指令集中指令及操作数的特征,动态选择指令的编码方式,实现对指令relax,最大程度地提高了程序的代码密度。对于在汇编时不能确定编码方式的指令,通过留出重定位的方式,由链接时完成优化。在链接时,利用信息的确定性,实现对整个程序的压缩和指令的替换,使得程序执行效率更高,代码占用空间更小。汇编链接时优化技术克服了传统编译器只限于一个模块优化的缺点,把优化范围扩展到整个程序,实现了跨模块的优化,使得基于CK810 处理器的程序代码密度平均提高7. 52% ,性能平均提升7. 91% 。

关键词: 汇编优化, 链接优化, 动态编码, 重定位, 压缩, 替换

Abstract: According to feature of 16/ 32 bit mixed instruction set of CK810,assembly and link time optimization techniques based on the 16/ 32 mixed instruction set of CK810 make use of assembler output binary files to achieve instructions relax and coding instructions dynamically. The assembler gives relocations to linker for instructions that can’ t decide how to code at assembly time,the techniques fully utilizes the information only available at link time to realize of the entire program for compression and replacement of instructions to make program more efficient and small. Assembly and link optimization techniques overcome the limitations of traditional compilers by enlarging the optimizing scope from a single function or a module to the whole program,making the code density on CK810 increase an average of 7. 52% , the average performance improvement of 7. 91% .

Key words: assembly optimization, link optimization, dynamic coding, relocation, compaction, replace

中图分类号: