AnsweredAssumed Answered

How to reduce pipeline stall and flushes, When a loop expires?

Question asked by dishant19 on May 6, 2016
Latest reply on May 11, 2016 by MaheshN

Hi all,


I have written some assembly code that includes loops. Whenever a loop finishes it take 12 - 14 extra cycles to move on to next instruction. Is their any way to reduce it? For example refer to the below code


f1 = dm(i4,m6),

f2 = pm(i12,m14);


      lcntr = r8, do .row1 until lce;


         lcntr = r0, do .column1 until lce;

            f4 = f1 * f2, f1 = dm(i4,m6);

.column1:   pm(i13,m14) = f4;


.row1:   f2 = pm(i12,m14);



In the above code when inner loop counter expires , it moves on the label .row1 , but it takes 12 cycles. Similarly when outer loop counter expires it takes 14 cycles to move onto next instruction.