beautypg.com

Motorola DSP96002 User Manual

Page 625

background image

B-106

DSP96002 USER’S MANUAL

MOTOROLA

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 ffgt ; 1 1

rts ; 2 2

; ZOld = 0 boundary

_clip2_zon

move (r1)- ; 1 1

move y:(r1)+,d3.s ;Zn 1 1

fsub.s d3,d6 d6.s,d0.s ; 1 1

fseedd d6,d4 ; 1 1

fmpy.s d6,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 ffgt ; 1 1

rts ; 2 2

; XNew = WNew boundary

_clip2_xnp

move (r1)+n1 ; 1 1

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

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