This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

arm-elf soft-float endian problem


Hello,

I am trying to build a xgcc toolchain for an arm-elf target.
I am strugling with the endiannes of the software floating
point library.

It looks like the standard xgcc for the arm-elf target uses
little endian byte order but big endian word order (1.0 =
0x0000F03F 0x00000000). This is compatible to the floating
point format that the old ARM SDT 2.5 is using.

The new ARM ADS 2.X uses now pure endian software floating
point which means little endian word and byte order (1.0 =
0x00000000 0x0000F03F). I need to compile a compatible xgcc
which uses this format to be able to link it with my rom
library based on ADS 2.1 .

I tried to patch /src/gcc-3.2.1/newlib/libc/include/machine/ieeefp.h
but this didn't worked. Where can I select the endian format
of the floating point library, or why did my patch fail ?

Thanks,
Michael

$ diff -r -u /src/gcc-3.2.1/newlib/libc/include/machine/ieeefp.h
/src/gcc-3.2.1/newlib/libc/include/machine/ieeefp.orig.h
--- /src/gcc-3.2.1/newlib/libc/include/machine/ieeefp.h 2003-06-04
22:38:27.000000000 +0200
+++ /src/gcc-3.2.1/newlib/libc/include/machine/ieeefp.orig.h    2003-06-04
22:39:56.000000000 +0200
@@ -51,12 +51,9 @@
 */

 #if (defined(__arm__) || defined(__thumb__))
-/* ARM always has big-endian words.  Within those words the byte ordering
-   will be big or little endian depending upon the target.  */
-#ifdef __ARMEL__
-#define __IEEE_LITTLE_ENDIAN
-#else
 #define __IEEE_BIG_ENDIAN
+#ifdef __ARMEL__
+#define __IEEE_BYTES_LITTLE_ENDIAN
 #endif
 #endif



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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