MV .L1 A6, A_loopcount
loop:
LDB .D1T1 *A4++[1], A_x1
LDB .D2T2 *B4++[1], B_y1
SUB .L1 A_loopcount, 1, A_loopcount
CMPGT .L1 A_loopcount, 6, A_tmp
[A_tmp] B .S2 condition1
[A_tmp]ADDKPC loop, B3, 4
NOP 4
CMPGT .L1 A_loopcount, 3, A_tmp
[A_tmp] B .S2 condition2
[A_tmp]ADDKPC loop, B3, 4
NOP 4
CMPGT .L1 A_loopcount, 0, A_tmp
[A_tmp]B .S2 condition3
[A_tmp]ADDKPC loop, B3, 4
NOP 4
*===================== LOOP EPILOG ============================== *
[!A_loopcount]B .S2 B3 ;return
|| MVK .S1 1,A4 ;return 1
NOP 4
* ================= LOOP PROLOG ============================ *
condition1:
ADD .S1X A_x1, B_y1, A_sum
STB .D2T1 A_sum, *result++[1]
[A_loopcount] B .S2 B3
nop 5
condition2:
SUB .S1X A_x1, B_y1, A_sum
STB .D2T1 A_sum, *result++[1]
[A_loopcount] B .S2 B3
nop 5
condition3:
MPY .M1x A_x1, B_y1, A_sum
nop 1
STB .D2T1 A_sum, *result++[1]
[A_loopcount] B .S2 B3
nop 5
.end |