[uClibc-cvs] uClibc/libm math_private.h,1.2,1.3

Erik Andersen andersen at uclibc.org
Mon Feb 9 07:10:41 UTC 2004


Update of /var/cvs/uClibc/libm
In directory nail:/tmp/cvs-serv8069/libm

Modified Files:
	math_private.h 
Log Message:
Nicolas Pitre writes:

Hello Erik,

My patch adding ARM assembly soft-float routines to gcc also changes the
default FPA float word ordering for the saner VFP word ordering which is
also the order anyone would expect on a little endian machine.

Problem is that uClibc curently hardwire floats to big endian (FPA) ordering
in all cases.

Please consider the attached patch to fix this problem.


Nicolas



Index: math_private.h
===================================================================
RCS file: /var/cvs/uClibc/libm/math_private.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- math_private.h	26 Jun 2002 09:10:51 -0000	1.2
+++ math_private.h	9 Feb 2004 07:10:38 -0000	1.3
@@ -35,11 +35,12 @@
    ints.  */
 
 /*
- * Math on arm is little endian except for the FP word order which is
- * big endian.
+ * Math on arm is special:
+ * For FPA, float words are always big-endian.
+ * For VFP, floats words follow the memory system mode.
  */
 
-#if (__BYTE_ORDER == __BIG_ENDIAN) || defined(__arm__)
+#if (__BYTE_ORDER == __BIG_ENDIAN) || defined(__arm__) && !defined(__VFP_FP__)
 
 typedef union 
 {
@@ -53,7 +54,7 @@
 
 #endif
 
-#if (__BYTE_ORDER == __LITTLE_ENDIAN) && !defined(__arm__)
+#if (__BYTE_ORDER == __LITTLE_ENDIAN) && (!defined(__arm__) || defined(__VFP_FP__))
 
 typedef union 
 {




More information about the uClibc-cvs mailing list