Refining C/C++ Code
3-39
Optimizing C/C++ Code
Below is the resulting assembly file (file1.asm). Notice that the dot product loop
uses word accesses and the ‘C6000 intrinsics.
L2: ; PIPED LOOP KERNEL
[!A1] ADD .L2 B6,B7,B7
|| [!A1] ADD .L1 A6,A0,A0
|| MPY .M2X B5,A4,B6
|| MPYH .M1X B5,A4,A6
|| [ B0] B .S1 L2
|| LDW .D1T1 *+A5(4),A4
|| LDW .D2T2 *+B4(4),B6
[ A1] SUB .S1 A1,1,A1
|| [!A1] ADD .S2 B5,B8,B8
|| [!A1] ADD .L1 A6,A3,A3
|| MPY .M2X B6,A4,B5
|| MPYH .M1X B6,A4,A6
|| [ B0] SUB .L2 B0,1,B0
|| LDW .D1T1 *++A5(8),A4
|| LDW .D2T2 *++B4(8),B5