about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-09 05:35:13 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-09 05:35:13 +0000
commit918736844a6d9250240d5c0ddb67577f1dd29758 (patch)
tree7bae06661ecfa017aa3f15b13d502a37c7dabd1e
parent87843f15168b086d3f6d255ebfe311e314560004 (diff)
downloadglibc-918736844a6d9250240d5c0ddb67577f1dd29758.tar.gz
glibc-918736844a6d9250240d5c0ddb67577f1dd29758.tar.xz
glibc-918736844a6d9250240d5c0ddb67577f1dd29758.zip
Update.
	* sysdeps/ieee754/ieee754.h: Handle platforms with special
	__FLOAT_WORD_ORDER.  Patch by Joel Klecker <jk@espy.org>.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/ieee754/ieee754.h35
2 files changed, 37 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 92ff802601..76aa414071 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1999-08-08  Ulrich Drepper  <drepper@cygnus.com>
 
+	* sysdeps/ieee754/ieee754.h: Handle platforms with special
+	__FLOAT_WORD_ORDER.  Patch by Joel Klecker <jk@espy.org>.
+
 	* string/bits/string2.h: Mark void* operations as extensions.
 	* sysdeps/i386/i486/bits/string.h: Likewise.
 
diff --git a/sysdeps/ieee754/ieee754.h b/sysdeps/ieee754/ieee754.h
index ba40cc7683..cff0e942b0 100644
--- a/sysdeps/ieee754/ieee754.h
+++ b/sysdeps/ieee754/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1999 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
@@ -80,11 +80,18 @@ union ieee754_double
 	unsigned int mantissa1:32;
 #endif				/* Big endian.  */
 #if	__BYTE_ORDER == __LITTLE_ENDIAN
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int mantissa0:20;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+	unsigned int mantissa1:32;
+# else
 	/* Together these comprise the mantissa.  */
 	unsigned int mantissa1:32;
 	unsigned int mantissa0:20;
 	unsigned int exponent:11;
 	unsigned int negative:1;
+# endif
 #endif				/* Little endian.  */
       } ieee;
 
@@ -99,12 +106,20 @@ union ieee754_double
 	unsigned int mantissa0:19;
 	unsigned int mantissa1:32;
 #else
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int mantissa0:19;
+	unsigned int quiet_nan:1;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+	unsigned int mantissa1:32;
+# else
 	/* Together these comprise the mantissa.  */
 	unsigned int mantissa1:32;
 	unsigned int mantissa0:19;
 	unsigned int quiet_nan:1;
 	unsigned int exponent:11;
 	unsigned int negative:1;
+# endif
 #endif
       } ieee_nan;
   };
@@ -127,11 +142,19 @@ union ieee854_long_double
 	unsigned int mantissa1:32;
 #endif
 #if	__BYTE_ORDER == __LITTLE_ENDIAN
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int exponent:15;
+	unsigned int negative:1;
+	unsigned int empty:16;
+	unsigned int mantissa0:32;
+	unsigned int mantissa1:32;
+# else
 	unsigned int mantissa1:32;
 	unsigned int mantissa0:32;
 	unsigned int exponent:15;
 	unsigned int negative:1;
 	unsigned int empty:16;
+# endif
 #endif
       } ieee;
 
@@ -148,6 +171,15 @@ union ieee854_long_double
 	unsigned int mantissa1:32;
 #endif
 #if	__BYTE_ORDER == __LITTLE_ENDIAN
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int exponent:15;
+	unsigned int negative:1;
+	unsigned int empty:16;
+	unsigned int mantissa0:30;
+	unsigned int quiet_nan:1;
+	unsigned int one:1;
+	unsigned int mantissa1:32;
+# else
 	unsigned int mantissa1:32;
 	unsigned int mantissa0:30;
 	unsigned int quiet_nan:1;
@@ -155,6 +187,7 @@ union ieee854_long_double
 	unsigned int exponent:15;
 	unsigned int negative:1;
 	unsigned int empty:16;
+# endif
 #endif
       } ieee_nan;
   };