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]

Re:  problem while building arm vfp softfloat gcc 


On 10 Feb 2004, add wrote:

> I have already tried this on my platform, it still print out 0.000000
> so it seems like a problem of glibc.
> I swapped the register according to montavista's iwmmxt_le-gcc produced asm
> code. Are you sure that code is correct? if so, then that means montavista's
> toolchain is not compatible with others, although it uses the same vfp
> softfloat patch.

*** Beware ***

MV's iwmmxt_le toolchain is using VFP word ordering.  My soft-float patch is 
also using VFP word ordering by default.

*** However ***

Libraries like glibc need to be aware of it too, since they play with doubl 
float values directly.  See for example this patch I produced for uClibc:

--- ./libm/math_private.h.orig	Sun Feb  8 21:19:46 2004
+++ ./libm/math_private.h	Sun Feb  8 21:30:53 2004
@@ -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 
 {


Nicolas


------
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]