summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-12-23 22:20:59 +0000
committermarcel <marcel@FreeBSD.org>2008-12-23 22:20:59 +0000
commitcabae62b0ba1d31f524c393e294d3a5e08d543fc (patch)
treee53e0cc50653c1177127b792f2618edc51c491fd /lib/msun
parent09a2776e693b4dac1f7a62f8e264ecf07bb78485 (diff)
downloadFreeBSD-src-cabae62b0ba1d31f524c393e294d3a5e08d543fc.zip
FreeBSD-src-cabae62b0ba1d31f524c393e294d3a5e08d543fc.tar.gz
Add support for the FPA floating-point format on ARM. The
FPA floating-point format is identical to the VFP format, but is always stored in big-endian. Introduce _IEEE_WORD_ORDER to describe the byte-order of the FP representation. Obtained from: Juniper Networks, Inc
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/math_private.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h
index 1d3b7a1..46d65cc 100644
--- a/lib/msun/src/math_private.h
+++ b/lib/msun/src/math_private.h
@@ -38,7 +38,17 @@
* ints.
*/
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef __arm__
+#if defined(__VFP_FP__)
+#define IEEE_WORD_ORDER BYTE_ORDER
+#else
+#define IEEE_WORD_ORDER BIG_ENDIAN
+#endif
+#else /* __arm__ */
+#define IEEE_WORD_ORDER BYTE_ORDER
+#endif
+
+#if IEEE_WORD_ORDER == BIG_ENDIAN
typedef union
{
@@ -52,7 +62,7 @@ typedef union
#endif
-#if BYTE_ORDER == LITTLE_ENDIAN
+#if IEEE_WORD_ORDER == LITTLE_ENDIAN
typedef union
{
OpenPOWER on IntegriCloud