This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CYG_DOUBLE_BYTEORDER on little-endian ARM w/ VFP floating point format


       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  <daniel.neri@sigicom.se>
+
+	* 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  <icampbell@arcom.com>
 
 	* 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 <daniel.neri@sigicom.se>
Sigicom AB, Stockholm, Sweden

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