diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-02-09 07:10:38 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-02-09 07:10:38 +0000 |
commit | ac1281c2785fd4487817690b270fc3f052280a54 (patch) | |
tree | 785cf916e0aa281134c5b848e7ca568dc43a2b9d /libm | |
parent | 13311ad67ca4d647be2728a418eb108644f77406 (diff) |
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
Diffstat (limited to 'libm')
-rw-r--r-- | libm/math_private.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libm/math_private.h b/libm/math_private.h index bfc3365c4..cc876607f 100644 --- a/libm/math_private.h +++ b/libm/math_private.h @@ -11,7 +11,7 @@ /* * from: @(#)fdlibm.h 5.1 93/09/24 - * $Id: math_private.h,v 1.2 2002/06/26 09:10:51 andersen Exp $ + * $Id: math_private.h,v 1.3 2004/02/09 07:10:38 andersen Exp $ */ #ifndef _MATH_PRIVATE_H_ @@ -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 @@ typedef union #endif -#if (__BYTE_ORDER == __LITTLE_ENDIAN) && !defined(__arm__) +#if (__BYTE_ORDER == __LITTLE_ENDIAN) && (!defined(__arm__) || defined(__VFP_FP__)) typedef union { |