MOTOROLA
DSP96002 USER’S MANUAL
B-169
move d6.l,d1.h ; "
ori #$10,ccr ; set infinity bit
ori #$09,ier ; set OVF and INX bits in IER
ori #$09,er ; set OVF and INX bits in ER
jmp _done ; result is infinity
;
; Begin Rounding the Result
;
;
; Check for Denormalized Numbers
;
_rnd move #eden,d7.l ; get denorm exponent
move d6.l,d5.l ; get expr
move #emsk,d4.l ; get exponent mask
and d4,d5 ; delete tags and sign
cmp d7,d5 ; compare exponents
jne _remst ; jump if not a denorm
tst d3 ; test mantr.high
dec d6 ifpl.u ; decrement expr if no int bit
;
; Remove Bits to Right of the Sticky Bit
;
_remst move #smsk,d7.l ; get sticky mask
and d7,d1 ; remove bits right of sticky
;
; Check GRS Bits Equal Zero
;
move d1.l,d5.l ; get register with GRS bits
move #grsmsk,d7.l ; get GRS mask
and d7,d5 ; get GRS bits
tst d5 ; check GRS bits = zero
jeq _lmove ; jump if no rounding required
ori #$1,ier ; set inexact result bit
ori #$1,er ; set inexact result bit
;
; Check Rounding Mode
;
jset #21,sr,_r1chk ; jump if rounding bit r0 = 1
jset #22,sr,_rminf ; jump if round toward -infinity
;
; Round to nearest even
;
jclr #10,d5.l,_lmove ; check guard bit
bclr #10,d5.l ; delete G bit
tst d5 ; check sticky and round bits
jne _addone ; jump if S or R bits = 1
jset #11,d1.l,_addone ; add one if LSB of result = 1
jmp _lmove ; no rounding required
_r1chk jclr #22,sr,_lmove ; jump if round toward zero
;
; Round infinity
;
jclr #31,d6.l,_addone ; add one if positive
jmp _lmove ; get result in d1
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......