summaryrefslogtreecommitdiffstats
path: root/sys
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 /sys
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 'sys')
-rw-r--r--sys/arm/include/ieee.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/arm/include/ieee.h b/sys/arm/include/ieee.h
index a7411dd..059d0dc 100644
--- a/sys/arm/include/ieee.h
+++ b/sys/arm/include/ieee.h
@@ -91,6 +91,12 @@
#define DBL_EXPBITS 11
#define DBL_FRACBITS 52
+#if defined(__VFP_FP__)
+#define _IEEE_WORD_ORDER _BYTE_ORDER
+#else
+#define _IEEE_WORD_ORDER _BIG_ENDIAN
+#endif
+
struct ieee_single {
#if _BYTE_ORDER == _BIG_ENDIAN
u_int sng_sign:1;
@@ -110,10 +116,15 @@ struct ieee_double {
u_int dbl_frach:20;
u_int dbl_fracl;
#else
+#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN
u_int dbl_fracl;
+#endif
u_int dbl_frach:20;
u_int dbl_exp:11;
u_int dbl_sign:1;
+#if _IEEE_WORD_ORDER == _BIG_ENDIAN
+ u_int dbl_fracl;
+#endif
#endif
};
OpenPOWER on IntegriCloud