Motorola DSP96002 User Manual page 690

32-bit digital signal processor
Table of Contents

Advertisement

; ***
; ***
; ***
; ***
; ***
; ***
; ***
; ***
Routine Inputs:
; ***
d6 - IEEE double extended precision operand 1
; ***
d7 - IEEE double extended precision operand 2
; ***
; ***
Routine Outputs:
; ***
d5 - IEEE double extended precision result
; ***
; ***
Registers Used:
; ***
d0.l - general purpose usage
; ***
d0.m - unbiased operand 2 exponent
; ***
; ***
d0.h - MSB contains the XOR of the sign bits
; ***
d1.l - general purpose usage
; ***
d1.m - unbiased operand 1 exponent
; ***
; ***
d1.h - LSB contains the sticky bit
; ***
d2.m,l - partial product and intermediate calculations
; ***
d3.m,l - partial product and intermediate calculations
; ***
d4.m,l - partial product and intermediate calculations
; ***
d5.m,l - partial product and intermediate calculations
; ***
; ***
NOTES: Currently ignores the FR, P, RP bits.
; ***
; ***
; ***
; ***
section ieeemult
SR_MASK equ
EXP_MSK equ
EBIAS
equ
EMAX
equ
EMIN
equ
EDEN
equ
MAX
equ
SMSK
equ
INUM
equ
sdptest
; ****** Define Program Macros ******
depftst macro
; This macro performs the "ftst" function on DEP floating pt vars.
; It sets the NAN,I,N,Z bits in the CCR register appropriately.
;
;
op = register name of the form "Dn" containing the floating pt var
;
in all 96 bits of the register (not destroyed)
MOTOROLA
f = fraction bits, initially bits in mantissas
l = least significant fraction bit, initially in mantissas
g = guard bit
r = round bit
s - sticky bit
- unbiased result exponent
- loop index for denormalizing upon underflow.
Assumes that operands are NOT UNnormalized numbers
Code size greatly decreased if "depftst" macro
becomes a routine
$ffff80c0
; Status Register Mask, resets cond. codes
$7ff
; Mask for exponent field, 16-bits
$3ff
; Exponent bias for IEEE double precision
$3ff
; Max exp for normalized double precision val
$fffffc02
; Min exp for normalized double precision val
$fffffc01
; Exp for denormalized double precision val
$7ff
; Max exp (biased), indicating infs & NaNs
$1ff
; Mask for sticky bit calculation
$800
; Increment for LSB
; double precision multiplication subroutine
op,tmp1,tmp2
DSP96002 USER'S MANUAL
(destroyed)
(destroyed)
B-171

Advertisement

Table of Contents
loading

Table of Contents