Subject: Re: port-sgimips/36251
To: None <port-sgimips-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Marcus Comstedt <marcus@mc.pp.se>
List: netbsd-bugs
Date: 05/01/2007 21:15:08
The following reply was made to PR port-sgimips/36251; it has been noted by GNATS.

From: Marcus Comstedt <marcus@mc.pp.se>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sgimips/36251
Date: Tue, 01 May 2007 23:12:43 +0200

 The problem here seems to be that while renorm_fs_s leaves the
 fractional part of the mantissa offsetted by SLEAD_ZEROS (8) bits,
 norm_d expects it to be offset by DLEAD_ZEROS (11) bits.  When
 shifting the mantissa into the right place, norm_d will add 3
 (DLEAD_ZEROS-SLEAD_ZEROS) to the exponent to compensate for the
 fact that it had to shift the mantissa down 3 bits.  cvt_d_s should
 either do
 
   addiu t1, t1, (SLEAD_ZEROS)-(DLEAD_ZEROS)
 
 (parentheses required due to the way xLEAD_ZEROS are defined...)
 to pre-adjust the exponent before jumping to norm_d, or shift the
 mantissa down 3 bits like the normalized case does.
 
 
   // Marcus