Motorola DSP96002 User Manual
Page 614
MOTOROLA
DSP96002 USER’S MANUAL
B-95
fcmp d0,d5 ; 1 1
fcmp d3,d5 ; 1 1
fcmp d2,d5 ; 1 1
jclr #7,sr,_r_clip2 ; 2 3
;---------------------------------------------------------
;
; Reject loop single-clip routine
;
;---------------------------------------------------------
; Dispatch to clipping routines
move x:(r1)+,d0.s y:,d6.s ;Xo Zo 1 1
move x:(r1)+n1,d5.s y:,d2.s ;Yo Wo 1 1
move d7.l,x:(r6) ;Cnt 1 1
fsub.s d0,d2 d2.s,d1.s ; 1 1
fjslt _clip1_xp ; 2 2
fadd.s d0,d1 d1.s,d2.s ; 1 1
fjslt _clip1_xn ; 2 2
fsub.s d5,d2 d2.s,d1.s ; 1 1
fjslt _clip1_yp ; 2 2
fadd.s d5,d1 d1.s,d2.s ; 1 1
fjslt _clip1_yn ; 2 2
fsub.s d6,d2 d2.s,d1.s ; 1 1
fjslt _clip1_zp ; 2 2
ftst d6 ; 1 1
fjslt _clip1_zn ; 2 2
; Calculate reciprocal 1/W (old point)
fseedd d1,d6 ; 1 1
fmpy.s d1,d6,d1 d9.s,d4.s ; 1 1
fsub.s d1,d4 d4.s,d3.s ; 1 1
fmpy.s d1,d4,d1 (r4)-n4 ; r4-2 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