diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-02-05 20:08:52 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-02-05 20:08:52 +0000 |
commit | b4a84c66957edf7ef23a88e651f23e21dcb209bc (patch) | |
tree | 7c8df1c3406c5ab3a884a6bea06e4e43de7373a6 /newlib/libc | |
parent | 656a999a33537b173d04326f9ef2bd49969e9fed (diff) | |
download | newlib-b4a84c66957edf7ef23a88e651f23e21dcb209bc.zip newlib-b4a84c66957edf7ef23a88e651f23e21dcb209bc.tar.gz newlib-b4a84c66957edf7ef23a88e651f23e21dcb209bc.tar.bz2 |
2004-02-05 Paul Brook <paul@codesourcery.com>
* libc/include/machine/ieeefp.h[__arm__][__VFP_FP__]: Set
IEEE_{BIG,LITTLE} based on __ARMEL__ flag.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/include/machine/ieeefp.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index 37afbfe..3672103 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -51,11 +51,25 @@ */ #if (defined(__arm__) || defined(__thumb__)) && !defined(__MAVERICK__) -/* ARM always has big-endian words. Within those words the byte ordering - will be big or little endian depending upon the target. */ -#define __IEEE_BIG_ENDIAN -#ifdef __ARMEL__ -#define __IEEE_BYTES_LITTLE_ENDIAN +/* ARM traditionally used big-endian words; and within those words the + byte ordering was big or little endian depending upon the target. + Modern floating-point formats are naturally ordered; in this case + __VFP_FP__ will be defined, even if soft-float. + + FIXME: long double support is broken for the ARM when __ARMEL__ + is specified. New long double formats need to be added + to the long double conversion routines. */ +#ifdef __VFP_FP__ +# ifdef __ARMEL__ +# define __IEEE_LITTLE_ENDIAN +# else +# define __IEEE_BIG_ENDIAN +# endif +#else +# define __IEEE_BIG_ENDIAN +# ifdef __ARMEL__ +# define __IEEE_BYTES_LITTLE_ENDIAN +# endif #endif #endif |