This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 2.0.104


>1. A patch for the big endian floating point word order.  I'll let Phil handle
>that one.

This is the patch that Scott is referring to.  I've never been very happy with 
it which is why I haven't submitted it before.  But now we're close to 2.1 
perhaps it should go in regardless unless someone can see a problem.

p.

1998-09-03  Philip Blundell  <pb@nexus.co.uk>

	* sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Define to big
	endian.
	* math/math_private.h: Use __FLOAT_WORD_ORDER rather than
	BYTE_ORDER.
	* string/endian.h: If __FLOAT_WORD_ORDER wasn't defined by
	<bits/endian.h>, make it the same as __BYTE_ORDER.

Index: gnu/libc/math/math_private.h
diff -u gnu/libc/math/math_private.h:1.11 gnu/libc/math/math_private.h:1.11.6.1
--- gnu/libc/math/math_private.h:1.11	Thu Sep  3 15:25:00 1998
+++ gnu/libc/math/math_private.h	Thu Oct  1 16:30:50 1998
@@ -34,7 +34,7 @@
 /* A union which permits us to convert between a double and two 32 bit
    ints.  */
 
-#if BYTE_ORDER == BIG_ENDIAN
+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
 
 typedef union
 {
@@ -48,7 +48,7 @@
 
 #endif
 
-#if BYTE_ORDER == LITTLE_ENDIAN
+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
 
 typedef union
 {
@@ -150,7 +150,7 @@
 /* A union which permits us to convert between a long double and
    three 32 bit ints.  */
 
-#if BYTE_ORDER == BIG_ENDIAN
+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
 
 typedef union
 {
@@ -166,7 +166,7 @@
 
 #endif
 
-#if BYTE_ORDER == LITTLE_ENDIAN
+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
 
 typedef union
 {
Index: gnu/libc/string/endian.h
diff -u gnu/libc/string/endian.h:1.1.1.2 gnu/libc/string/endian.h:1.1.1.2.6.1
--- gnu/libc/string/endian.h:1.1.1.2	Tue Oct 21 09:39:21 1997
+++ gnu/libc/string/endian.h	Thu Oct  1 16:31:02 1998
@@ -34,6 +34,12 @@
 /* This file defines `__BYTE_ORDER' for the particular machine.  */
 #include <bits/endian.h>
 
+/* Some machines (ARM) may need to use a different endianness for 
+   floating point values.  */
+#ifndef __FLOAT_WORD_ORDER
+#define __FLOAT_WORD_ORDER __BYTE_ORDER
+#endif
+
 #ifdef	__USE_BSD
 # define LITTLE_ENDIAN	__LITTLE_ENDIAN
 # define BIG_ENDIAN	__BIG_ENDIAN
Index: gnu/libc/sysdeps/arm/bits/endian.h
diff -u gnu/libc/sysdeps/arm/bits/endian.h:1.2 gnu/libc/sysdeps/arm/bits/endian.h:1.2.6.1
--- gnu/libc/sysdeps/arm/bits/endian.h:1.2	Tue Dec  2 14:58:30 1997
+++ gnu/libc/sysdeps/arm/bits/endian.h	Thu Oct  1 16:31:09 1998
@@ -1,7 +1,8 @@
-/* ARM is little-endian.  */
+/* ARM is (usually) little-endian but with a big-endian FPU.  */
 
 #ifndef _ENDIAN_H
 # error "Never use <bits/endian.h> directly; include <endian.h> instead."
 #endif
 
 #define __BYTE_ORDER __LITTLE_ENDIAN
+#define __FLOAT_WORD_ORDER __BIG_ENDIAN




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]