summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm/bits/endian.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-08-04 22:35:13 +0000
committerMike Frysinger <vapier@gentoo.org>2005-08-04 22:35:13 +0000
commite627587cec42ab167884081390629923d8be2011 (patch)
tree360717a6f191e05fa026f1bc5211cf1fdbd74493 /libc/sysdeps/linux/arm/bits/endian.h
parente451f991945cdd33001b7d934cd48a990283ebcc (diff)
yvasilev writes in Bug 235:
uClibc uses wrong word order in vfp floating point arithmetic. I found this using my modification to N. Pitre's soft-float gcc patch, but this modifications were made just to allow gcc to compile code for armv4l, while nothing about fp arithmetic was changed.
Diffstat (limited to 'libc/sysdeps/linux/arm/bits/endian.h')
-rw-r--r--libc/sysdeps/linux/arm/bits/endian.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/arm/bits/endian.h b/libc/sysdeps/linux/arm/bits/endian.h
index 5e54cc753..14cd5c603 100644
--- a/libc/sysdeps/linux/arm/bits/endian.h
+++ b/libc/sysdeps/linux/arm/bits/endian.h
@@ -1,4 +1,7 @@
-/* ARM is (usually) little-endian but with a big-endian FPU. */
+/* ARM is (usually) little-endian.
+ * Older FPU style (FPA) is always big-endian.
+ * Newer FPU style (VFP) is same as host byte-order.
+ */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
@@ -9,4 +12,8 @@
#else
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
+#ifdef __VFP_FP__
+#define __FLOAT_WORD_ORDER __BYTE_ORDER
+#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
+#endif