diff options
author | Elliott Hughes <enh@google.com> | 2013-01-30 19:06:37 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-02-01 14:51:19 -0800 |
commit | a0ee07829a9ba7e99ef68e8c12551301cc797f0f (patch) | |
tree | fefc432ee572779579a16d2868d4181a33399281 /libm/i386 | |
parent | a990cf5b3392c5aef767aee1e67b4d7ef651afc6 (diff) | |
download | bionic-a0ee07829a9ba7e99ef68e8c12551301cc797f0f.zip bionic-a0ee07829a9ba7e99ef68e8c12551301cc797f0f.tar.gz bionic-a0ee07829a9ba7e99ef68e8c12551301cc797f0f.tar.bz2 |
Upgrade libm.
This brings us up to date with FreeBSD HEAD, fixes various bugs, unifies
the set of functions we support on ARM, MIPS, and x86, fixes "long double",
adds ISO C99 support, and adds basic unit tests.
It turns out that our "long double" functions have always been broken
for non-normal numbers. This patch fixes that by not using the upstream
implementations and just forwarding to the regular "double" implementation
instead (since "long double" on Android is just "double" anyway, which is
what BSD doesn't support).
All the tests pass on ARM, MIPS, and x86, plus glibc on x86-64.
Bug: 3169850
Bug: 8012787
Bug: https://code.google.com/p/android/issues/detail?id=6697
Change-Id: If0c343030959c24bfc50d4d21c9530052c581837
Diffstat (limited to 'libm/i386')
-rw-r--r-- | libm/i386/_fpmath.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libm/i386/_fpmath.h b/libm/i386/_fpmath.h index 92719d9..4f1f5f4 100644 --- a/libm/i386/_fpmath.h +++ b/libm/i386/_fpmath.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/i386/_fpmath.h,v 1.5 2005/03/07 04:55:22 das Exp $ + * $FreeBSD$ */ union IEEEl2bits { @@ -35,6 +35,11 @@ union IEEEl2bits { unsigned int sign :1; unsigned int junk :16; } bits; + struct { + unsigned long long man :64; + unsigned int expsign :16; + unsigned int junk :16; + } xbits; }; #define LDBL_NBIT 0x80000000 @@ -46,4 +51,4 @@ union IEEEl2bits { #define LDBL_TO_ARRAY32(u, a) do { \ (a)[0] = (uint32_t)(u).bits.manl; \ (a)[1] = (uint32_t)(u).bits.manh; \ -} while(0) +} while (0) |