Hi, I tried using "C intrinsics" provided for ETSI basic ops to help me optimize a speech codec performance. It has a piece of code which reads as for(i = 0; i < 10; i++) a = L_mac(a,b,c); The compiler generates the following code with -03 option STM #9,BRC LD *SP(3),B MVDK *SP(2),*(AR1) RPTB L2-1 ; loop starts L1: RSBX OVM SSBX SXM MVMD AR1,T SFTA A,8 SFTA A,-8 ORM #2,*(PMST) SSBX FRCT SSBX OVM ORM #2,*(PMST) MAC *(BL), A ; loop ends ; Some of the statements within the loop such as setting the FRCT bit and the OVM bit can be done outside the loop (only once). Some of the code such as sign extending into guard bits looks redundant. Is there a way to instruct the compiler to generate better code. I am using version 2.00.00 of CCS. Or we have to live with this and hand optimize in assembly? Thanks In Advance. |
C intrinsic Of C54x
Started by ●March 28, 2003