Handle ARMs with big endian IEEE words but little endian IEEE bytes

This commit is contained in:
Nick Clifton 2001-06-28 10:40:09 +00:00
parent 288f125efd
commit 2b6b730c98
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2001-06-27 Nick Clifton <nickc@cambridge.redhat.com>
* libc/include/machine/ieeefp.h (__IEEE_BYTES_LITTLE_ENDIAN):
Define for little endian ARMs.
* libc/stdlib/mprec.h (Storeinc): Use little endian version if
__IEEE_BYTES_LITTLE_ENDIAN is defined.
2001-06-11 Danny Smith <dannysmith@users.sourceforge.net> 2001-06-11 Danny Smith <dannysmith@users.sourceforge.net>
* /libc/include/ctype.h (is* and to* macros): Do not define if C++. * /libc/include/ctype.h (is* and to* macros): Do not define if C++.

View File

@ -21,9 +21,11 @@
#if defined(__arm__) || defined(__thumb__) #if defined(__arm__) || defined(__thumb__)
/* ARM always has big-endian words. Within those words the byte ordering /* ARM always has big-endian words. Within those words the byte ordering
appears to be big or little endian. Newlib doesn't seem to care about will be big or little endian depending upon the target. */
the byte ordering within words. */
#define __IEEE_BIG_ENDIAN #define __IEEE_BIG_ENDIAN
#ifdef __ARMEL__
#define __IEEE_BYTES_LITTLE_ENDIAN
#endif
#endif #endif
#ifdef __hppa__ #ifdef __hppa__

View File

@ -81,7 +81,7 @@ union double_union
* An alternative that might be better on some machines is * An alternative that might be better on some machines is
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff) * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
*/ */
#if defined(IEEE_8087) + defined(VAX) #if defined (__IEEE_BYTES_LITTLE_ENDIAN) + defined (IEEE_8087) + defined (VAX)
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \ #define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
((unsigned short *)a)[0] = (unsigned short)c, a++) ((unsigned short *)a)[0] = (unsigned short)c, a++)
#else #else