about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-04 01:20:04 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-04 01:20:04 +0000
commit8cd806cfc8f8fe7b70cc30eb30579f5ee9503eab (patch)
tree2a9a44b768f7ad1bc38d938171f116c4fe5e26f0 /sysdeps/i386
parent76aecea11dc291f54b288480a5e9543eab02aae8 (diff)
downloadglibc-8cd806cfc8f8fe7b70cc30eb30579f5ee9503eab.tar.gz
glibc-8cd806cfc8f8fe7b70cc30eb30579f5ee9503eab.tar.xz
glibc-8cd806cfc8f8fe7b70cc30eb30579f5ee9503eab.zip
Update.
	* sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Handle the
	pseudo denormal representation of LDBL_MIN.

	* configure.in: Correct test for pserver CVS access.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/ldbl2mpn.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sysdeps/i386/ldbl2mpn.c b/sysdeps/i386/ldbl2mpn.c
index 631fe2eab4..386cf198e2 100644
--- a/sysdeps/i386/ldbl2mpn.c
+++ b/sysdeps/i386/ldbl2mpn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -87,13 +87,26 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
 		}
 	      *expt = LDBL_MIN_EXP - 1 - cnt;
 	    }
-	  else
+	  else if (res_ptr[0] != 0)
 	    {
 	      count_leading_zeros (cnt, res_ptr[0]);
 	      res_ptr[N - 1] = res_ptr[0] << cnt;
 	      res_ptr[0] = 0;
 	      *expt = LDBL_MIN_EXP - 1 - BITS_PER_MP_LIMB - cnt;
 	    }
+	  else
+	    {
+	      /* This is the special case of the pseudo denormal number
+		 with only the implicit leading bit set.  The value is
+		 in fact a normal number and so we have to treat this
+		 case differently.  */
+#if N == 2
+	      res_ptr[N - 1] = 0x80000000ul;
+#else
+	      res_ptr[0] = 0x8000000000000000ul;
+#endif
+	      *expt = LDBL_MIN_EXP - 1;
+	    }
 	}
     }