diff options
author | marcel <marcel@FreeBSD.org> | 2008-12-23 22:20:59 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2008-12-23 22:20:59 +0000 |
commit | cabae62b0ba1d31f524c393e294d3a5e08d543fc (patch) | |
tree | e53e0cc50653c1177127b792f2618edc51c491fd /lib/libc/include | |
parent | 09a2776e693b4dac1f7a62f8e264ecf07bb78485 (diff) | |
download | FreeBSD-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/libc/include')
-rw-r--r-- | lib/libc/include/fpmath.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/include/fpmath.h b/lib/libc/include/fpmath.h index d33cfdc..697d582 100644 --- a/lib/libc/include/fpmath.h +++ b/lib/libc/include/fpmath.h @@ -30,6 +30,10 @@ #include <sys/endian.h> #include "_fpmath.h" +#ifndef _IEEE_WORD_ORDER +#define _IEEE_WORD_ORDER _BYTE_ORDER +#endif + union IEEEf2bits { float f; struct { @@ -52,10 +56,15 @@ union IEEEd2bits { double d; struct { #if _BYTE_ORDER == _LITTLE_ENDIAN +#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN unsigned int manl :32; +#endif unsigned int manh :20; unsigned int exp :11; unsigned int sign :1; +#if _IEEE_WORD_ORDER == _BIG_ENDIAN + unsigned int manl :32; +#endif #else /* _BIG_ENDIAN */ unsigned int sign :1; unsigned int exp :11; |