Matrix Computation Example (cont.)
[lcntr] LDW .D1T1 *aptr++(4),aa0 ;8 if(lcntr) load a[i] from memory
|| [lcntr] LDW .D2T2 *btmp++(4),bb0 ;8 if(lcntr) load b[i] from memory
|| [lcntr] SUB .L2 lcntr,1,lcntr ;8 if(lcntr) lcntr -= 1
|| [icntr] SUB .L1 icntr,1,icntr ;8 if(icntr) icntr -= 1
|| MPYSP .M1X aa0,bb0,mult0 ;3 mult0 = a[i]*b[i]
|| [icntr] B .S2 iloop ;4 if(icntr) branch to iloop
[lcntr] LDW .D1T1 *aptr++(4),aa0 ;9 if(lcntr) load a[i] from memory
|| [lcntr] LDW .D2T2 *btmp++(4),bb0 ;9 if(lcntr) load b[i] from memory
|| [lcntr] SUB .L2 lcntr,1,lcntr ;9 if(lcntr) lcntr -= 1
|| [icntr] SUB .L1 icntr,1,icntr ;9 if(icntr) icntr -= 1
|| MPYSP .M1X aa0,bb0,mult0 ;4 mult0 = a[i]*b[i]
|| [icntr] B .S2 iloop ;5 if(icntr) branch to iloop
[lcntr] LDW .D1T1 *aptr++(4),aa0 ;10 if(lcntr) load a[i] from memory
|| [lcntr] LDW .D2T2 *btmp++(4),bb0 ;10 if(lcntr) load b[i] from memory
|| [lcntr] SUB .L2 lcntr,1,lcntr ;10 if(lcntr) lcntr -= 1
|| [icntr] SUB .S1 icntr,1,icntr ;10 if(icntr) icntr -= 1
|| MPYSP .M1X aa0,bb0,mult0 ;5 mult0 = a[i]*b[i]
|| ADDSP .L1 mult0,sum0,sum0 ;1 sum0 = sum0+mult0
|| [icntr] B .S2 iloop ;6 if(icntr) branch to iloop