Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-06-28 14:40:09 +0400
committerNick Clifton <nickc@redhat.com>2001-06-28 14:40:09 +0400
commit2b6b730c986a53e9e10ef22508541bdb3151a5fe (patch)
tree28b0f82b77b5a273b6fdf2b36034cb585a43a671
parent288f125efd393633bb18277d585682f09a5a8b52 (diff)
Handle ARMs with big endian IEEE words but little endian IEEE bytes
-rw-r--r--newlib/ChangeLog8
-rw-r--r--newlib/libc/include/machine/ieeefp.h6
-rw-r--r--newlib/libc/stdlib/mprec.h2
3 files changed, 13 insertions, 3 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index e257e42c5..040a00e0c 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -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>
* /libc/include/ctype.h (is* and to* macros): Do not define if C++.
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h
index b96f91274..cc5ced4f0 100644
--- a/newlib/libc/include/machine/ieeefp.h
+++ b/newlib/libc/include/machine/ieeefp.h
@@ -21,9 +21,11 @@
#if defined(__arm__) || defined(__thumb__)
/* 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
- the byte ordering within words. */
+ will be big or little endian depending upon the target. */
#define __IEEE_BIG_ENDIAN
+#ifdef __ARMEL__
+#define __IEEE_BYTES_LITTLE_ENDIAN
+#endif
#endif
#ifdef __hppa__
diff --git a/newlib/libc/stdlib/mprec.h b/newlib/libc/stdlib/mprec.h
index 001f0c284..31d52e131 100644
--- a/newlib/libc/stdlib/mprec.h
+++ b/newlib/libc/stdlib/mprec.h
@@ -81,7 +81,7 @@ union double_union
* An alternative that might be better on some machines is
* #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, \
((unsigned short *)a)[0] = (unsigned short)c, a++)
#else