Motorola DSP96002 User Manual
Page 627
B-108
DSP96002 USER’S MANUAL
MOTOROLA
; YNew = -WNew boundary
_clip2_ynn
move (r1)+ ; 1 1
move x:(r1)-,d2.s y:,d3.s ;Yo Wo 1 1
fadd.s d3,d2 ; 1 1
fsub.s d6,d2 d2.s,d0.s ; 1 1
fseedd d2,d4 ; 1 1
fmpy.s d2,d4,d6 d9.s,d2.s ; 1 1
fmpy d0,d4,d0 fsub.s d6,d2 d2.s,d3.s ; 1 1
fmpy.s d6,d2,d6 d2.s,d4.s ; 1 1
fmpy d0,d4,d0 fsub.s d6,d3 ; 1 1
fmpy.s d0,d3,d0 ; 1 1
fcmp d7,d0 ; 1 1
ftfr.s d0,d7 fflt ; 1 1
rts ; 2 2
; ZNew = WNew boundary
_clip2_znp
move (r1)+ ; 1 1
move y:(r1)-,d0.s ;Wo 1 1
move y:(r1),d2.s ;Zo 1 1
fsub.s d2,d0 ; 1 1
fadd.s d0,d5 ; 1 1
fseedd d5,d4 ; 1 1
fmpy.s d5,d4,d5 d9.s,d2.s ; 1 1
fmpy d0,d4,d0 fsub.s d5,d2 d2.s,d3.s ; 1 1
fmpy.s d5,d2,d5 d2.s,d4.s ; 1 1
fmpy d0,d4,d0 fsub.s d5,d3 ; 1 1
fmpy.s d0,d3,d0 ; 1 1
fcmp d7,d0 ; 1 1
ftfr.s d0,d7 fflt ; 1 1
rts ; 2 2
; ZNew = 0 boundary