• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2013, Vol. 35 ›› Issue (8): 8-14.

• 论文 • Previous Articles     Next Articles

Design and implementation of saturation
arithmetic instructions mapping in Matrix complier       

DAN Xiaoqiang,CHEN Yueyue,SUN Haiyan,YANG Liu,LUO Jie,XIN Naijun,WANG Ji   

  1. (School of Computer Science,National University of Defense Technology,Changsha 410073,China)
  • Received:2012-01-08 Revised:2012-04-09 Online:2013-08-25 Published:2013-08-25

Abstract:

Matrix is a highperformance DSP processor for soft base stations. The saturation arithmetic instruction is of importance in Matrix, which enables the DSP algorithms more secure, accurate and efficient. As a result, supporting saturation arithmetic instructions mapping is critical for Matrix compiler, which is developed based on GCC. However, the current versions of GCC only support saturation arithmetic instruction with fixed-point types rather than integer or float types. Based on the internal mechanism of instructions mapping in GCC, an implementation scheme of C extensions based saturation arithmetic instructions is proposed. Further more, the proposed scheme is validated by implementing the saturation integer addition instruction mapping, and the results show that this scheme can support Matrix's saturation arithmetic instruction mapping efficiently and accurately.

Key words: gcc;saturation arithmetic;instruction mapping;C extensions