Motorola DSP96002 User Manual
Page 608
MOTOROLA
DSP96002 USER’S MANUAL
B-89
;
Words
ICycles
wf3d
move x:(r0)+,d0.s ;X 1 1
move x:(r0)+,d5.s y:(r4)+,d4.s ;Y M11 1 1
fmpy.s d4,d0,d2 x:(r4)+,d3.s y:,d4.s ;M41 M21 1 1
fmpy d4,d5,d3 fadd.s d3,d2 x:(r0)+,d6.s y:(r4)+,d4.s ;Z M31 1 1
fmpy d4,d6,d3 fadd.s d3,d2 x:(r1)+n1,d1.s y:(r4)+,d4.s ;r1+ M12 1 1
fmpy d4,d0,d1 fadd.s d3,d2 x:(r4)+,d3.s y:,d4.s ;M42,M22 1 1
fmpy d4,d5,d3 fadd.s d3,d1 y:(r4)+,d4.s ; M32 1 1
fmpy d4,d6,d3 fadd.s d3,d1 d2.s,x:(r1)+ y:(r4)+,d4.s ;Xo M13 1 1
fmpy d4,d0,d2 fadd.s d3,d1 x:(r4)+,d3.s y:,d4.s ;M43 M23 1 1
fmpy d4,d5,d3 fadd.s d3,d2 y:(r4)+,d4.s ; M33 1 1
fmpy d4,d6,d3 fadd.s d3,d2 d1.s,x:(r1)- y:(r4)+,d4.s ;Yo M14 1 1
fmpy d4,d0,d1 fadd.s d3,d2 x:(r4)+,d3.s y:,d4.s ;M44 M24 1 1
fmpy d4,d5,d3 fadd.s d3,d1 y:(r4)+,d4.s ; M34 1 1
fmpy d4,d6,d3 fadd.s d3,d1 d2.s,y:(r1) ; Zo 1 1
fadd.s d3,d1 x:(r1)+,d0.s ;Xo 1 1
; Test if point is within viewing pyramid
fneg.s d1 d1.s,d2.s ; 1 1
ori #$80,ccr ; 1 1
fcmp d1,d0 ; 1 1
fcmp d0,d2 x:(r1)-,d5.s ;Yo 1 1
fcmp d1,d5 n0,d4.s ; 1 1
fcmp d5,d2 y:(r1)+,d6.s ; Zo 1 1
fcmp d4,d6 ; 1 1
fcmp d6,d2 ; 1 1
jclr #7,sr,_reject_entry ; 2 3
; Calculate reciprocal 1/W
fseedd d2,d6 ; 1 1
fmpy.s d2,d6,d1 d9.s,d4.s ; 1 1
fsub.s d1,d4 d4.s,d3.s d2.s,y:(r1)+ ; Wo 1 1
fmpy.s d1,d4,d1 ; 1 1
fmpy d6,d4,d1 fsub.s d1,d3 ; 1 1
fmpy.s d1,d3,d1 x:(r4)+,d4.s y:,d3.s ;Xs Xf 1 1