Revert "Update to FreeBSD libm r336523."
This reverts commit f86ee10278116d211cfb08679416444e0e714cb5.
Incorrect result for fmodf(3.0f, 0f) = 1.0f breaks ART tests.
Bug: 111710419
Test: art/test/testrunner/testrunner.py -b -t 436-rem-float --target
Change-Id: I7eae68fb92740db33415d16418447bcbbd98ecba
diff --git a/libm/upstream-freebsd/lib/msun/src/math_private.h b/libm/upstream-freebsd/lib/msun/src/math_private.h
index 7832304..637a09a 100644
--- a/libm/upstream-freebsd/lib/msun/src/math_private.h
+++ b/libm/upstream-freebsd/lib/msun/src/math_private.h
@@ -11,7 +11,7 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD: head/lib/msun/src/math_private.h 336362 2018-07-17 07:42:14Z bde $
+ * $FreeBSD: head/lib/msun/src/math_private.h 319047 2017-05-28 06:13:38Z mmel $
*/
#ifndef _MATH_PRIVATE_H_
@@ -48,47 +48,6 @@
#define IEEE_WORD_ORDER BYTE_ORDER
#endif
-/* A union which permits us to convert between a long double and
- four 32 bit ints. */
-
-#if IEEE_WORD_ORDER == BIG_ENDIAN
-
-typedef union
-{
- long double value;
- struct {
- u_int32_t mswhi;
- u_int32_t mswlo;
- u_int32_t lswhi;
- u_int32_t lswlo;
- } parts32;
- struct {
- u_int64_t msw;
- u_int64_t lsw;
- } parts64;
-} ieee_quad_shape_type;
-
-#endif
-
-#if IEEE_WORD_ORDER == LITTLE_ENDIAN
-
-typedef union
-{
- long double value;
- struct {
- u_int32_t lswlo;
- u_int32_t lswhi;
- u_int32_t mswlo;
- u_int32_t mswhi;
- } parts32;
- struct {
- u_int64_t lsw;
- u_int64_t msw;
- } parts64;
-} ieee_quad_shape_type;
-
-#endif
-
#if IEEE_WORD_ORDER == BIG_ENDIAN
typedef union
@@ -335,9 +294,8 @@
/* Support switching the mode to FP_PE if necessary. */
#if defined(__i386__) && !defined(NO_FPSETPREC)
-#define ENTERI() ENTERIT(long double)
-#define ENTERIT(returntype) \
- returntype __retval; \
+#define ENTERI() \
+ long double __retval; \
fp_prec_t __oprec; \
\
if ((__oprec = fpgetprec()) != FP_PE) \
@@ -360,7 +318,6 @@
} while (0)
#else
#define ENTERI()
-#define ENTERIT(x)
#define RETURNI(x) RETURNF(x)
#define ENTERV()
#define RETURNV() return
@@ -478,24 +435,6 @@
*/
void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
-/*
- * Mix 1 or 2 NaNs. First add 0 to each arg. This normally just turns
- * signaling NaNs into quiet NaNs by setting a quiet bit. We do this
- * because we want to never return a signaling NaN, and also because we
- * don't want the quiet bit to affect the result. Then mix the converted
- * args using addition. The result is typically the arg whose mantissa
- * bits (considered as in integer) are largest.
- *
- * Technical complications: the result in bits might depend on the precision
- * and/or on compiler optimizations, especially when different register sets
- * are used for different precisions. Try to make the result not depend on
- * at least the precision by always doing the main mixing step in long double
- * precision. Try to reduce dependencies on optimizations by adding the
- * the 0's in different precisions (unless everything is in long double
- * precision).
- */
-#define nan_mix(x, y) (((x) + 0.0L) + ((y) + 0))
-
#ifdef _COMPLEX_H
/*
@@ -846,7 +785,4 @@
long double __kernel_cosl(long double, long double);
long double __kernel_tanl(long double, long double, int);
-long double __p1evll(long double, void *, int);
-long double __polevll(long double, void *, int);
-
#endif /* !_MATH_PRIVATE_H_ */