Motorola DSP96002 User Manual page 680

32-bit digital signal processor
Table of Contents

Advertisement

;
; Round toward -infinity
;
_rminf
jclr
_addone move
add
jcc
inc
_acar
jcc
lsr
ror
inc
;
; Check if Result is Infinity
;
move
move
and
cmp
jne
move
move
ori
ori
ori
jmp
;
; Get Result in D1
;
_lmove
move
_emove
move
_done
nop
nop
nop
rts
endsec
B.4.2
IEEE Double Precision Subtraction
;
; Double Precision IEEE floating-point Subtraction
;
;
D0 - D1
;
;
;
; Alters Data ALU Registers
;
d0.h
;
d1.h
;
;
MOTOROLA
#31,d6.l,_lmove ; no rounding if positive
#$800,d7.l
; get increment number
d7,d1
; add one to lsb
_acar
; jump if no carry
d3
; increment mantr.high
_lmove
; jump if result normalized
d3
; shift right mantr.high
d1
; shift right mantr.low
d6
; increment expr
#emsk,d7.l
; get exp mask
d6.l,d5.l
; get expr
d7,d5
; delete tags
d7,d5
; check for max exp
_lmove
; jump if no overflow
#0,d1.l
; set result to infinity
#0,d1.m
;
#$10,ccr
; set infinity bit
#$09,ier
; set OVF and INX bits in IER
#$09,er
; set OVF and INX bits in ER
_emove
; get infinity exponent
d3.l,d1.m
; move mantr.high to d1
d6.l,d1.h
; move expr to d1
;
;
;
; end of subroutine
D1
d0.m
d0.l
d1.m
d1.l
d2.m
d2.l
d3.l
DSP96002 USER'S MANUAL
"
B-161

Advertisement

Table of Contents
loading

Table of Contents