Hi,

The ARM VFP floating point format uses "natural" byteorder, which
meant that the definition of CYG_DOUBLE_BYTEORDER was incorrect on
little-endian ARM when building for VFP floating point format (GCC
option "-mfpu=vfp").


diff -Npr -U5 packages.13c9f7330398/hal/arm/arch/current/ChangeLog packages.3318221671d6/hal/arm/arch/current/ChangeLog
--- packages.13c9f7330398/hal/arm/arch/current/ChangeLog	2006-09-06 17:38:59.000000000 +0200
+++ packages.3318221671d6/hal/arm/arch/current/ChangeLog	2006-09-06 17:38:59.000000000 +0200
@@ -1,5 +1,11 @@
+2006-09-06  Daniel Néri  <[EMAIL PROTECTED]>
+
+	* include/basetype.h: (CYG_DOUBLE_BYTEORDER): Add proper
+	definition for VFP floating point format (uses "natural" byte
+	order) on little-endian ARM.
+
 2005-04-21  Ian Campbell  <[EMAIL PROTECTED]>
 
 	* src/redboot_linux_exec.c: Added -t option which takes the
 	physical address to copy to. Very useful for booting non-Linux
 	operating systems.
diff -Npr -U5 packages.13c9f7330398/hal/arm/arch/current/include/basetype.h packages.3318221671d6/hal/arm/arch/current/include/basetype.h
--- packages.13c9f7330398/hal/arm/arch/current/include/basetype.h	2006-09-06 17:38:59.000000000 +0200
+++ packages.3318221671d6/hal/arm/arch/current/include/basetype.h	2006-09-06 17:38:59.000000000 +0200
@@ -59,11 +59,16 @@
 #ifdef __ARMEB__
 # define CYG_BYTEORDER           CYG_MSBFIRST    // Big endian
 #else
 # define CYG_BYTEORDER           CYG_LSBFIRST    // Little endian
 #endif
-#define CYG_DOUBLE_BYTEORDER    CYG_MSBFIRST    // Big? endian
+
+#if defined(__ARMEL__) && defined(__VFP_FP__)
+# define CYG_DOUBLE_BYTEORDER    CYG_LSBFIRST
+#else
+# define CYG_DOUBLE_BYTEORDER    CYG_MSBFIRST    // Big? endian
+#endif
 
 //-----------------------------------------------------------------------------
 // ARM does not usually use labels with underscores.
 
 #define CYG_LABEL_NAME(_name_) _name_

Best wishes,
-- 
Daniel Néri <[EMAIL PROTECTED]>
Sigicom AB, Stockholm, Sweden

Reply via email to