BENCHMARK PROGRAMS
B - 24 BENCHMARK PROGRAMS
MOTOROLA
lua (r0)+n0,r1 ;r1 ptr to next group b
move r1,r5 ;r5 ptr to next group d
; Intermediate Passes -- W(n) < 1
;
; A---\ /---A’= Re[ A + jC + (B - jD)W(k) ] = A+BWr+DWi=A+T1
; B----\_|_/----B’= Im[ A + jC - (B - jD)W(k) ] = C+DWr-BWi=T2+C
; C----/ | \----C’= Re[ A + jC - (B - jD)W(k) ] = A-(BWr+DWi)=A-T1
; D---/ \---D’= Im[-A - jC - (B - jD)W(k) ] = -C+DWr-BWi=T2-C
; ______________________________
move x:(r2)+,x0 y:(r6)+,y0 ;x0=Wi, y0=Wr
move x:(r1)-,x1 y:(r5),y1 ;x1=b,y1=d
move x:(r1),B ;for pointer reason
do n0,end_bfly ;n0 bfly in this group
mpy -x1,x0,B B,x:(r1) ;B=-bWi, PUT c’ to x:b
mac y0,y1,B y:(r4),A ;B=dWr-bWi=T2, A=c
sub A,B ;B=T2-c=d’
addl B,A x:(r1)+,B B,x:(r5)+ ;A=T2+c=b’, PUT d’
mpy -x1,y0,B x:(r0),A A,y:(r4)+ ;B=-bWr, A=a, PUT b’ to y:c
mac -x0,y1,B x:(r1)-,x1 ;B=-bWr-dWi=-T1, x1=next b
sub B,A ;A=a+T1=a’
addl A,B A,x:(r0)+ y:(r5),y1 ;B=a-T1=c’, y1=next d, PUT a’
end_bfly move B,x:(r1)+ ;PUT last b’
end_group
move #idata,r0 ;r0 = ptr to a
end_pass
;the last pass converts bergland order to normal order by calling bergtable
move r7,r2 ;r2 points to real twiddle
move r2,r6 ;r6 points to imag twiddle
move r0,r4 r4 points to c
move #bergtable,r3 ;r3=pointer of bergland table
move #(points/4)-1,n2 ;n2=group per pass -1
move x:(r3)+,r7 ;get first index
move x:(r3)+,r1 ;get second index
move #2,n4
; first group in the last pass
move x:(r0)+,A y:(r4)+,B ;A=a, B=c
sub B,A x:(r0)+,x0 y:(r6)+,y0 ;A=a-c=c’,x0=b, y0=Wr for next bfly
addl A,B A,x:(r1) y:(r4),A ;B=a+c=a’, A=d,PUT c’ to x:b
sub x0,A B,x:(r7) ;A=d-b=d’,PUT a’ to x
move y:(r4)+,B ;B=d
add x0,B A,y:(r1) ;B=d+b=b’, A=next a,PUT d’
move x:(r0)+,A B,y:(r7) ;A=next a, PUT b’
move x:(r2)+,x0 y:(r4)+,B ;x0=Wi,B=next c
do n2,end_lastg ;rest groups in the last pass