Fix LP64 libm for 128-bit long doubles

* reworked amd64/_fpmath.h and arm64/_fpmath.h to support 128-bit long
doubles.
* improved tests to cover long double cases
* made modfl an alias for LP32

Tests pass on x86, x86_64, arm, arm64 and mips.

Bug: 12921273

Change-Id: Ibe39acde57972447a8950fa45b1e702acc68ebeb
This commit is contained in:
Calin Juravle
2014-03-14 17:56:46 +00:00
parent 849e162d3b
commit 4d77c1151c
22 changed files with 2982 additions and 270 deletions

View File

@@ -27,6 +27,9 @@
* $FreeBSD: src/lib/libc/include/fpmath.h,v 1.3 2005/02/06 03:23:31 das Exp $
*/
#ifndef _FPMATH_
#define _FPMATH_
#include <endian.h>
#include "_fpmath.h"
@@ -76,9 +79,15 @@ union IEEEd2bits {
* Android works around those cases by replacing the broken functions with our own trivial stubs
* that call the regular "double" function.
*/
#ifndef __LP64__
#define __fpclassifyl __broken__fpclassify
#define __isfinitel __broken__isfinitel
#define __isinfl __broken__isinfl
#define __isnanl __broken__isnanl
#define __isnormall __broken__isnormall
#define __signbitl __broken_signbitl
#endif // __LP64__
#endif // _FPMATH_