beautypg.com

Motorola DSP96002 User Manual

Page 626

background image

MOTOROLA

DSP96002 USER’S MANUAL

B-107

fmpy.s d0,d3,d0 ; 1 1

fcmp d7,d0 ; 1 1

ftfr.s d0,d7 fflt ; 1 1

rts ; 2 2

; XNew = -WNew boundary

_clip2_xnn

move (r1)- ; 1 1

move y:(r1)-,d3.s ;Wo 1 1

move x:(r1)+n1,d2.s ;Xo 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

; YNew = WNew boundary

_clip2_ynp

move (r1)- ; 1 1

move x:(r1)+,d2.s y:,d0.s ;Yo Wo 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