B-182
DSP96002 USER’S MANUAL
MOTOROLA
; extended precision number.
;
; Entry point: ieee2dplib: c(r0)
←
convert(d0)
;
; Input: r0 contains the lowest address of the 4-word internal
; extended precision number
; d0 contains the DSP96002 floating-point number.
; The DSP96002 has the following floating-point formats:
; SP normalized (24 bit mantissa)
; SP denormalized
; SEP normalized (32 bit mantissa)
; SEP denormalized (encoded as DP normalized)
; DP normalized
; The SP denormalized is encoded using the U tag. All other encodings
; appear the same with varying amount of significand bits.
;
; Output: r0 points to the lowest address of a double precision
; number in non-IEEE double precision format.
;
; Error checking:
; NaNs - Not converted, internal A register not affected
; +/- inf - Limited to maximum internal format value
;
; Alters: D0.L,D1.L,D2.L,D0.H,D1.H
;
ieee2dplib
ftst d0 ;check input
fjor _notnan ;ok if not nan
rts ;no conversion
_notnan fjeq uflow ;if zero, set zero
clr d1 ;get zero for sign
bclr #31,d0.h ;get sign and clear sign bit
inc d1 ifcs ;if sign bit is set, inc
ftst d0 d1.l,x:(r0+sign) ;reset flags, save sign
fjinf oflow ;limit if infinity
jset #30,d0.h,_dodenorm ;do denorm if U tag is set
move d0.m,x:(r0+ms) ;save ms of significand
move d0.l,x:(r0+ls) ;save ls of significand
move d0.h,d0.l ;get dp exponent
move #$1ffffc00,d1.l ;get bias adjustment
add d1,d0 ;new bias
move d0.l,x:(r0) ;set exponent
rts
_dodenorm
move d0.m,d0.l ;get denormed sp significand
bfind d0,d1 ;find first 1
clr d2 d1.h,d1.l ;get a 0, move shift
lsl d1.h,d0 d2.l,x:(r0+ls) ;norm ms, set 0 ls
move d0.l,x:(r0+ms) ;set ms
move #$1fffff81,d0.l ;get exponent
sub d1,d0 ;sub denorm shift to get new bias
move d0.l,x:(r0) ;set exponent
rts
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: ......