Move math headers in with the other headers.
Keeping them separate is a pain for the NDK, and doesn't help the platform.
Change-Id: I96b8beef307d4a956e9c0a899ad9315adc502582
diff --git a/libm/amd64/fenv.c b/libm/amd64/fenv.c
index 4b24ff9..9edaf88 100755
--- a/libm/amd64/fenv.c
+++ b/libm/amd64/fenv.c
@@ -28,7 +28,14 @@
*/
#include <fenv.h>
-#include <machine/fpu.h>
+
+/*
+ * The i387 defaults to Intel extended precision mode and round to nearest,
+ * with all exceptions masked.
+ */
+#define __INITIAL_NPXCW__ 0x037f
+#define __INITIAL_MXCSR__ 0x1f80
+#define __INITIAL_MXCSR_MASK__ 0xffbf
#define SSE_MASK_SHIFT 7
diff --git a/libm/i387/fenv.c b/libm/i387/fenv.c
index f64f8dc..64c2b7a 100644
--- a/libm/i387/fenv.c
+++ b/libm/i387/fenv.c
@@ -28,12 +28,31 @@
#include <sys/cdefs.h>
#include <sys/types.h>
-#include "npx.h"
#include "fenv.h"
#define ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
/*
+ * The hardware default control word for i387's and later coprocessors is
+ * 0x37F, giving:
+ *
+ * round to nearest
+ * 64-bit precision
+ * all exceptions masked.
+ *
+ * We modify the affine mode bit and precision bits in this to give:
+ *
+ * affine mode for 287's (if they work at all) (1 in bitfield 1<<12)
+ * 53-bit precision (2 in bitfield 3<<8)
+ *
+ * 64-bit precision often gives bad results with high level languages
+ * because it makes the results of calculations depend on whether
+ * intermediate values are stored in memory or in FPU registers.
+ */
+#define __INITIAL_NPXCW__ 0x127F
+#define __INITIAL_MXCSR__ 0x1F80
+
+/*
* As compared to the x87 control word, the SSE unit's control word
* has the rounding control bits offset by 3 and the exception mask
* bits offset by 7.
diff --git a/libm/i387/npx.h b/libm/i387/npx.h
deleted file mode 100644
index 38c2add..0000000
--- a/libm/i387/npx.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)npx.h 5.3 (Berkeley) 1/18/91
- * $FreeBSD: src/sys/i386/include/npx.h,v 1.29.2.1 2006/07/01 00:57:55 davidxu Exp $
- */
-
-/*
- * 287/387 NPX Coprocessor Data Structures and Constants
- * W. Jolitz 1/90
- */
-
-#ifndef _MACHINE_NPX_H_
-#define _MACHINE_NPX_H_
-
-/* Environment information of floating point unit */
-struct env87 {
- long en_cw; /* control word (16bits) */
- long en_sw; /* status word (16bits) */
- long en_tw; /* tag word (16bits) */
- long en_fip; /* floating point instruction pointer */
- u_short en_fcs; /* floating code segment selector */
- u_short en_opcode; /* opcode last executed (11 bits ) */
- long en_foo; /* floating operand offset */
- long en_fos; /* floating operand segment selector */
-};
-
-/* Contents of each floating point accumulator */
-struct fpacc87 {
-#ifdef dontdef /* too unportable */
- u_long fp_mantlo; /* mantissa low (31:0) */
- u_long fp_manthi; /* mantissa high (63:32) */
- int fp_exp:15; /* exponent */
- int fp_sgn:1; /* mantissa sign */
-#else
- u_char fp_bytes[10];
-#endif
-};
-
-/* Floating point context */
-struct save87 {
- struct env87 sv_env; /* floating point control/status */
- struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */
- u_char sv_pad0[4]; /* padding for (now unused) saved status word */
- /*
- * Bogus padding for emulators. Emulators should use their own
- * struct and arrange to store into this struct (ending here)
- * before it is inspected for ptracing or for core dumps. Some
- * emulators overwrite the whole struct. We have no good way of
- * knowing how much padding to leave. Leave just enough for the
- * GPL emulator's i387_union (176 bytes total).
- */
- u_char sv_pad[64]; /* padding; used by emulators */
-};
-
-struct envxmm {
- u_int16_t en_cw; /* control word (16bits) */
- u_int16_t en_sw; /* status word (16bits) */
- u_int16_t en_tw; /* tag word (16bits) */
- u_int16_t en_opcode; /* opcode last executed (11 bits ) */
- u_int32_t en_fip; /* floating point instruction pointer */
- u_int16_t en_fcs; /* floating code segment selector */
- u_int16_t en_pad0; /* padding */
- u_int32_t en_foo; /* floating operand offset */
- u_int16_t en_fos; /* floating operand segment selector */
- u_int16_t en_pad1; /* padding */
- u_int32_t en_mxcsr; /* SSE sontorol/status register */
- u_int32_t en_mxcsr_mask; /* valid bits in mxcsr */
-};
-
-/* Contents of each SSE extended accumulator */
-struct xmmacc {
- u_char xmm_bytes[16];
-};
-
-struct savexmm {
- struct envxmm sv_env;
- struct {
- struct fpacc87 fp_acc;
- u_char fp_pad[6]; /* padding */
- } sv_fp[8];
- struct xmmacc sv_xmm[8];
- u_char sv_pad[224];
-} __aligned(16);
-
-union savefpu {
- struct save87 sv_87;
- struct savexmm sv_xmm;
-};
-
-/*
- * The hardware default control word for i387's and later coprocessors is
- * 0x37F, giving:
- *
- * round to nearest
- * 64-bit precision
- * all exceptions masked.
- *
- * We modify the affine mode bit and precision bits in this to give:
- *
- * affine mode for 287's (if they work at all) (1 in bitfield 1<<12)
- * 53-bit precision (2 in bitfield 3<<8)
- *
- * 64-bit precision often gives bad results with high level languages
- * because it makes the results of calculations depend on whether
- * intermediate values are stored in memory or in FPU registers.
- */
-#define __INITIAL_NPXCW__ 0x127F
-#define __INITIAL_MXCSR__ 0x1F80
-
-#ifdef _KERNEL
-
-#define IO_NPX 0x0F0 /* Numeric Coprocessor */
-#define IO_NPXSIZE 16 /* 80387/80487 NPX registers */
-
-#define IRQ_NPX 13
-
-/* full reset on some systems, NOP on others */
-#define npx_full_reset() outb(IO_NPX + 1, 0)
-
-int npxdna(void);
-void npxdrop(void);
-void npxexit(struct thread *td);
-int npxformat(void);
-int npxgetregs(struct thread *td, union savefpu *addr);
-void npxinit(u_short control);
-void npxsave(union savefpu *addr);
-void npxsetregs(struct thread *td, union savefpu *addr);
-int npxtrap(void);
-#endif
-
-#endif /* !_MACHINE_NPX_H_ */
diff --git a/libm/include/amd64/machine/fenv.h b/libm/include/amd64/machine/fenv.h
deleted file mode 100644
index c2b25ed..0000000
--- a/libm/include/amd64/machine/fenv.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * Copyright (c) 2004-2005 David Schultz <das (at) FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _AMD64_FENV_H_
-#define _AMD64_FENV_H_
-
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-/*
- * Each symbol representing a floating point exception expands to an integer
- * constant expression with values, such that bitwise-inclusive ORs of _all
- * combinations_ of the constants result in distinct values.
- *
- * We use such values that allow direct bitwise operations on FPU/SSE registers.
- */
-#define FE_INVALID 0x01
-#define FE_DENORMAL 0x02
-#define FE_DIVBYZERO 0x04
-#define FE_OVERFLOW 0x08
-#define FE_UNDERFLOW 0x10
-#define FE_INEXACT 0x20
-
-/*
- * The following symbol is simply the bitwise-inclusive OR of all floating-point
- * exception constants defined above.
- */
-#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO | \
- FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
-
-/*
- * Each symbol representing the rounding direction, expands to an integer
- * constant expression whose value is distinct non-negative value.
- *
- * We use such values that allow direct bitwise operations on FPU/SSE registers.
- */
-#define FE_TONEAREST 0x000
-#define FE_DOWNWARD 0x400
-#define FE_UPWARD 0x800
-#define FE_TOWARDZERO 0xc00
-
-/*
- * fenv_t represents the entire floating-point environment.
- */
-typedef struct {
- struct {
- __uint32_t __control; /* Control word register */
- __uint32_t __status; /* Status word register */
- __uint32_t __tag; /* Tag word register */
- __uint32_t __others[4]; /* EIP, Pointer Selector, etc */
- } __x87;
- __uint32_t __mxcsr; /* Control, status register */
-} fenv_t;
-
-/*
- * fexcept_t represents the floating-point status flags collectively, including
- * any status the implementation associates with the flags.
- *
- * A floating-point status flag is a system variable whose value is set (but
- * never cleared) when a floating-point exception is raised, which occurs as a
- * side effect of exceptional floating-point arithmetic to provide auxiliary
- * information.
- *
- * A floating-point control mode is a system variable whose value may be set by
- * the user to affect the subsequent behavior of floating-point arithmetic.
- */
-typedef __uint32_t fexcept_t;
-
-__END_DECLS
-
-#endif /* !_AMD64_FENV_H_ */
diff --git a/libm/include/amd64/machine/fpu.h b/libm/include/amd64/machine/fpu.h
deleted file mode 100644
index bda8f05..0000000
--- a/libm/include/amd64/machine/fpu.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* $OpenBSD: fpu.h,v 1.9 2011/03/23 16:54:34 pirofti Exp $ */
-/* $NetBSD: fpu.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
-
-#ifndef _MACHINE_FPU_H_
-#define _MACHINE_FPU_H_
-
-#include <sys/types.h>
-
-/*
- * amd64 only uses the extended save/restore format used
- * by fxsave/fsrestore, to always deal with the SSE registers,
- * which are part of the ABI to pass floating point values.
- * Must be stored in memory on a 16-byte boundary.
- */
-
-struct fxsave64 {
- u_int16_t fx_fcw;
- u_int16_t fx_fsw;
- u_int8_t fx_ftw;
- u_int8_t fx_unused1;
- u_int16_t fx_fop;
- u_int64_t fx_rip;
- u_int64_t fx_rdp;
- u_int32_t fx_mxcsr;
- u_int32_t fx_mxcsr_mask;
- u_int64_t fx_st[8][2]; /* 8 normal FP regs */
- u_int64_t fx_xmm[16][2]; /* 16 SSE2 registers */
- u_int8_t fx_unused3[96];
-} __packed;
-
-struct savefpu {
- struct fxsave64 fp_fxsave; /* see above */
- u_int16_t fp_ex_sw; /* saved status from last exception */
- u_int16_t fp_ex_tw; /* saved tag from last exception */
-};
-
-/*
- * The i387 defaults to Intel extended precision mode and round to nearest,
- * with all exceptions masked.
- */
-#define __INITIAL_NPXCW__ 0x037f
-#define __INITIAL_MXCSR__ 0x1f80
-#define __INITIAL_MXCSR_MASK__ 0xffbf
-
-#ifdef _KERNEL
-/*
- * XXX
- */
-struct trapframe;
-struct cpu_info;
-
-extern uint32_t fpu_mxcsr_mask;
-
-void fpuinit(struct cpu_info *);
-void fpudrop(void);
-void fpudiscard(struct proc *);
-void fputrap(struct trapframe *);
-void fpusave_proc(struct proc *, int);
-void fpusave_cpu(struct cpu_info *, int);
-void fpu_kernel_enter(void);
-void fpu_kernel_exit(void);
-
-#endif
-
-#endif /* _MACHINE_FPU_H_ */
diff --git a/libm/include/arm/machine/fenv.h b/libm/include/arm/machine/fenv.h
deleted file mode 100644
index 0e483e3..0000000
--- a/libm/include/arm/machine/fenv.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/msun/arm/fenv.h,v 1.5 2005/03/16 19:03:45 das Exp $
- */
-
-/*
- * Rewritten for Android.
- *
- * The ARM FPSCR is described here:
- * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344b/Chdfafia.html
- */
-
-#ifndef _ARM_FENV_H_
-#define _ARM_FENV_H_
-
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-typedef __uint32_t fenv_t;
-typedef __uint32_t fexcept_t;
-
-/* Exception flags. */
-#define FE_INVALID 0x01
-#define FE_DIVBYZERO 0x02
-#define FE_OVERFLOW 0x04
-#define FE_UNDERFLOW 0x08
-#define FE_INEXACT 0x10
-#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \
- FE_OVERFLOW | FE_UNDERFLOW)
-
-/* Rounding modes. */
-#define FE_TONEAREST 0x0
-#define FE_UPWARD 0x1
-#define FE_DOWNWARD 0x2
-#define FE_TOWARDZERO 0x3
-
-__END_DECLS
-
-#endif /* !_ARM_FENV_H_ */
diff --git a/libm/include/arm64/machine/fenv.h b/libm/include/arm64/machine/fenv.h
deleted file mode 100644
index a8568b8..0000000
--- a/libm/include/arm64/machine/fenv.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/msun/arm/fenv.h,v 1.5 2005/03/16 19:03:45 das Exp $
- */
-
-/*
- * In ARMv8, AArch64 state, floating-point operation is controlled by:
- *
- * * FPCR - 32Bit Floating-Point Control Register:
- * * [31:27] - Reserved, Res0;
- * * [26] - AHP, Alternative half-precision control bit;
- * * [25] - DN, Default NaN mode control bit;
- * * [24] - FZ, Flush-to-zero mode control bit;
- * * [23:22] - RMode, Rounding Mode control field:
- * * 00 - Round to Nearest (RN) mode;
- * * 01 - Round towards Plus Infinity (RP) mode;
- * * 10 - Round towards Minus Infinity (RM) mode;
- * * 11 - Round towards Zero (RZ) mode.
- * * [21:20] - Stride, ignored during AArch64 execution;
- * * [19] - Reserved, Res0;
- * * [18:16] - Len, ignored during AArch64 execution;
- * * [15] - IDE, Input Denormal exception trap;
- * * [14:13] - Reserved, Res0;
- * * [12] - IXE, Inexact exception trap;
- * * [11] - UFE, Underflow exception trap;
- * * [10] - OFE, Overflow exception trap;
- * * [9] - DZE, Division by Zero exception;
- * * [8] - IOE, Invalid Operation exception;
- * * [7:0] - Reserved, Res0.
- *
- * * FPSR - 32Bit Floating-Point Status Register:
- * * [31] - N, Negative condition flag for AArch32 (AArch64 sets PSTATE.N);
- * * [30] - Z, Zero condition flag for AArch32 (AArch64 sets PSTATE.Z);
- * * [29] - C, Carry conditon flag for AArch32 (AArch64 sets PSTATE.C);
- * * [28] - V, Overflow conditon flag for AArch32 (AArch64 sets PSTATE.V);
- * * [27] - QC, Cumulative saturation bit, Advanced SIMD only;
- * * [26:8] - Reserved, Res0;
- * * [7] - IDC, Input Denormal cumulative exception;
- * * [6:5] - Reserved, Res0;
- * * [4] - IXC, Inexact cumulative exception;
- * * [3] - UFC, Underflow cumulative exception;
- * * [2] - OFC, Overflow cumulative exception;
- * * [1] - DZC, Division by Zero cumulative exception;
- * * [0] - IOC, Invalid Operation cumulative exception.
- */
-
-#ifndef _ARM64_FENV_H_
-#define _ARM64_FENV_H_
-
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-typedef struct {
- __uint32_t __control; /* FPCR, Floating-point Control Register */
- __uint32_t __status; /* FPSR, Floating-point Status Register */
-} fenv_t;
-
-typedef __uint32_t fexcept_t;
-
-/* Exception flags. */
-#define FE_INVALID 0x01
-#define FE_DIVBYZERO 0x02
-#define FE_OVERFLOW 0x04
-#define FE_UNDERFLOW 0x08
-#define FE_INEXACT 0x10
-#define FE_DENORMAL 0x80
-#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \
- FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL)
-
-/* Rounding modes. */
-#define FE_TONEAREST 0x0
-#define FE_UPWARD 0x1
-#define FE_DOWNWARD 0x2
-#define FE_TOWARDZERO 0x3
-
-__END_DECLS
-
-#endif /* !_ARM64_FENV_H_ */
diff --git a/libm/include/complex.h b/libm/include/complex.h
deleted file mode 100644
index b54d2fc..0000000
--- a/libm/include/complex.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*-
- * Copyright (c) 2001-2011 The FreeBSD Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _COMPLEX_H
-#define _COMPLEX_H
-
-#include <sys/cdefs.h>
-
-#ifdef __GNUC__
-#define _Complex_I ((float _Complex)1.0i)
-#endif
-
-#ifdef __generic
-_Static_assert(__generic(_Complex_I, float _Complex, 1, 0),
- "_Complex_I must be of type float _Complex");
-#endif
-
-#define complex _Complex
-#define I _Complex_I
-
-#if __ISO_C_VISIBLE >= 2011
-#ifdef __clang__
-#define CMPLX(x, y) ((double complex){ x, y })
-#define CMPLXF(x, y) ((float complex){ x, y })
-#define CMPLXL(x, y) ((long double complex){ x, y })
-#else
-#define CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
-#define CMPLXF(x, y) __builtin_complex((float)(x), (float)(y))
-#define CMPLXL(x, y) __builtin_complex((long double)(x), (long double)(y))
-#endif
-#endif /* __ISO_C_VISIBLE >= 2011 */
-
-__BEGIN_DECLS
-#pragma GCC visibility push(default)
-
-/* 7.3.5 Trigonometric functions */
-/* 7.3.5.1 The cacos functions */
-double complex cacos(double complex);
-float complex cacosf(float complex);
-long double complex cacosl(long double complex);
-/* 7.3.5.2 The casin functions */
-double complex casin(double complex);
-float complex casinf(float complex);
-long double complex casinl(long double complex);
-/* 7.3.5.1 The catan functions */
-double complex catan(double complex);
-float complex catanf(float complex);
-long double complex catanl(long double complex);
-/* 7.3.5.1 The ccos functions */
-double complex ccos(double complex);
-float complex ccosf(float complex);
-long double complex ccosl(long double complex);
-/* 7.3.5.1 The csin functions */
-double complex csin(double complex);
-float complex csinf(float complex);
-long double complex csinl(long double complex);
-/* 7.3.5.1 The ctan functions */
-double complex ctan(double complex);
-float complex ctanf(float complex);
-long double complex ctanl(long double complex);
-
-/* 7.3.6 Hyperbolic functions */
-/* 7.3.6.1 The cacosh functions */
-double complex cacosh(double complex);
-float complex cacoshf(float complex);
-long double complex cacoshl(long double complex);
-/* 7.3.6.2 The casinh functions */
-double complex casinh(double complex);
-float complex casinhf(float complex);
-long double complex casinhl(long double complex);
-/* 7.3.6.3 The catanh functions */
-double complex catanh(double complex);
-float complex catanhf(float complex);
-long double complex catanhl(long double complex);
-/* 7.3.6.4 The ccosh functions */
-double complex ccosh(double complex);
-float complex ccoshf(float complex);
-long double complex ccoshl(long double complex);
-/* 7.3.6.5 The csinh functions */
-double complex csinh(double complex);
-float complex csinhf(float complex);
-long double complex csinhl(long double complex);
-/* 7.3.6.6 The ctanh functions */
-double complex ctanh(double complex);
-float complex ctanhf(float complex);
-long double complex ctanhl(long double complex);
-
-/* 7.3.7 Exponential and logarithmic functions */
-/* 7.3.7.1 The cexp functions */
-double complex cexp(double complex);
-float complex cexpf(float complex);
-long double complex cexpl(long double complex);
-/* 7.3.7.2 The clog functions */
-double complex clog(double complex);
-float complex clogf(float complex);
-long double complex clogl(long double complex);
-
-/* 7.3.8 Power and absolute-value functions */
-/* 7.3.8.1 The cabs functions */
-double cabs(double complex);
-float cabsf(float complex);
-long double cabsl(long double complex);
-/* 7.3.8.2 The cpow functions */
-double complex cpow(double complex, double complex);
-float complex cpowf(float complex, float complex);
-long double complex cpowl(long double complex, long double complex);
-/* 7.3.8.3 The csqrt functions */
-double complex csqrt(double complex);
-float complex csqrtf(float complex);
-long double complex csqrtl(long double complex);
-
-/* 7.3.9 Manipulation functions */
-/* 7.3.9.1 The carg functions */
-double carg(double complex);
-float cargf(float complex);
-long double cargl(long double complex);
-/* 7.3.9.2 The cimag functions */
-double cimag(double complex);
-float cimagf(float complex);
-long double cimagl(long double complex);
-/* 7.3.9.3 The conj functions */
-double complex conj(double complex);
-float complex conjf(float complex);
-long double complex conjl(long double complex);
-/* 7.3.9.4 The cproj functions */
-double complex cproj(double complex);
-float complex cprojf(float complex);
-long double complex cprojl(long double complex);
-/* 7.3.9.5 The creal functions */
-double creal(double complex);
-float crealf(float complex);
-long double creall(long double complex);
-
-#pragma GCC visibility pop
-__END_DECLS
-
-#endif /* _COMPLEX_H */
diff --git a/libm/include/fenv.h b/libm/include/fenv.h
deleted file mode 100644
index 73ecc80..0000000
--- a/libm/include/fenv.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* $OpenBSD: fenv.h,v 1.2 2011/05/25 21:46:49 martynas Exp $ */
-/* $NetBSD: fenv.h,v 1.2.4.1 2011/02/08 16:18:55 bouyer Exp $ */
-
-/*
- * Copyright (c) 2010 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _FENV_H_
-#define _FENV_H_
-
-#include <sys/cdefs.h>
-#include <machine/fenv.h>
-
-__BEGIN_DECLS
-#pragma GCC visibility push(default)
-
-int feclearexcept(int);
-int fegetexceptflag(fexcept_t *, int);
-int feraiseexcept(int);
-int fesetexceptflag(const fexcept_t *, int);
-int fetestexcept(int);
-
-int fegetround(void);
-int fesetround(int);
-
-int fegetenv(fenv_t *);
-int feholdexcept(fenv_t *);
-int fesetenv(const fenv_t *);
-int feupdateenv(const fenv_t *);
-
-int feenableexcept(int);
-int fedisableexcept(int);
-int fegetexcept(void);
-
-/*
- * The following constant represents the default floating-point environment
- * (that is, the one installed at program startup) and has type pointer to
- * const-qualified fenv_t.
- *
- * It can be used as an argument to the functions that manage the floating-point
- * environment, namely fesetenv() and feupdateenv().
- */
-extern const fenv_t __fe_dfl_env;
-#define FE_DFL_ENV (&__fe_dfl_env)
-
-#pragma GCC visibility pop
-__END_DECLS
-
-#endif /* ! _FENV_H_ */
diff --git a/libm/include/i387/machine/fenv.h b/libm/include/i387/machine/fenv.h
deleted file mode 100644
index de45add..0000000
--- a/libm/include/i387/machine/fenv.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/msun/i387/fenv.h,v 1.4 2005/03/17 22:21:46 das Exp $
- */
-
-#ifndef _I387_FENV_H_
-#define _I387_FENV_H_
-
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-/*
- * To preserve binary compatibility with FreeBSD 5.3, we pack the
- * mxcsr into some reserved fields, rather than changing sizeof(fenv_t).
- */
-typedef struct {
- __uint16_t __control;
- __uint16_t __mxcsr_hi;
- __uint16_t __status;
- __uint16_t __mxcsr_lo;
- __uint32_t __tag;
- char __other[16];
-} fenv_t;
-
-typedef __uint16_t fexcept_t;
-
-/* Exception flags */
-#define FE_INVALID 0x01
-#define FE_DENORMAL 0x02
-#define FE_DIVBYZERO 0x04
-#define FE_OVERFLOW 0x08
-#define FE_UNDERFLOW 0x10
-#define FE_INEXACT 0x20
-#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_DENORMAL | FE_INEXACT | \
- FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
-
-/* Rounding modes */
-#define FE_TONEAREST 0x0000
-#define FE_DOWNWARD 0x0400
-#define FE_UPWARD 0x0800
-#define FE_TOWARDZERO 0x0c00
-
-__END_DECLS
-
-#endif /* !I387_FENV_H_ */
diff --git a/libm/include/math.h b/libm/include/math.h
deleted file mode 100644
index 8e193cb..0000000
--- a/libm/include/math.h
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD$
- */
-
-#ifndef _MATH_H_
-#define _MATH_H_
-
-#include <sys/cdefs.h>
-#include <limits.h>
-
-#if !defined(__BIONIC_NO_MATH_INLINES)
-#define __BIONIC_MATH_INLINE(__def) extern __inline__ __always_inline __attribute__((gnu_inline)) __attribute__((__artificial__)) __def
-#else
-#define __BIONIC_MATH_INLINE(__def)
-#endif
-
-__BEGIN_DECLS
-#pragma GCC visibility push(default)
-
-#define HUGE_VAL __builtin_huge_val()
-
-#if __ISO_C_VISIBLE >= 1999
-#define FP_ILOGB0 (-INT_MAX)
-#define FP_ILOGBNAN INT_MAX
-
-#define HUGE_VALF __builtin_huge_valf()
-#define HUGE_VALL __builtin_huge_vall()
-#define INFINITY __builtin_inff()
-#define NAN __builtin_nanf("")
-
-#define MATH_ERRNO 1
-#define MATH_ERREXCEPT 2
-#define math_errhandling MATH_ERREXCEPT
-
-#if defined(__FP_FAST_FMA)
-#define FP_FAST_FMA 1
-#endif
-#if defined(__FP_FAST_FMAF)
-#define FP_FAST_FMAF 1
-#endif
-#if defined(__FP_FAST_FMAL)
-#define FP_FAST_FMAL 1
-#endif
-
-/* Symbolic constants to classify floating point numbers. */
-#define FP_INFINITE 0x01
-#define FP_NAN 0x02
-#define FP_NORMAL 0x04
-#define FP_SUBNORMAL 0x08
-#define FP_ZERO 0x10
-#define fpclassify(x) \
- __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
-
-#define isfinite(x) __builtin_isfinite(x)
-#define isinf(x) __builtin_isinf(x)
-#define isnan(x) __builtin_isnan(x)
-#define isnormal(x) __builtin_isnormal(x)
-
-#define isgreater(x, y) __builtin_isgreater((x), (y))
-#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
-#define isless(x, y) __builtin_isless((x), (y))
-#define islessequal(x, y) __builtin_islessequal((x), (y))
-#define islessgreater(x, y) __builtin_islessgreater((x), (y))
-#define isunordered(x, y) __builtin_isunordered((x), (y))
-
-#define signbit(x) \
- ((sizeof(x) == sizeof(float)) ? __builtin_signbitf(x) \
- : (sizeof(x) == sizeof(double)) ? __builtin_signbit(x) \
- : __builtin_signbitl(x))
-
-typedef double __double_t;
-typedef __double_t double_t;
-typedef float __float_t;
-typedef __float_t float_t;
-#endif /* __ISO_C_VISIBLE >= 1999 */
-
-/*
- * XOPEN/SVID
- */
-#if __BSD_VISIBLE || __XSI_VISIBLE
-#define M_E 2.7182818284590452354 /* e */
-#define M_LOG2E 1.4426950408889634074 /* log 2e */
-#define M_LOG10E 0.43429448190325182765 /* log 10e */
-#define M_LN2 0.69314718055994530942 /* log e2 */
-#define M_LN10 2.30258509299404568402 /* log e10 */
-#define M_PI 3.14159265358979323846 /* pi */
-#define M_PI_2 1.57079632679489661923 /* pi/2 */
-#define M_PI_4 0.78539816339744830962 /* pi/4 */
-#define M_1_PI 0.31830988618379067154 /* 1/pi */
-#define M_2_PI 0.63661977236758134308 /* 2/pi */
-#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
-#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
-#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
-
-#define MAXFLOAT ((float)3.40282346638528860e+38)
-extern int signgam;
-#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
-
-#if __USE_GNU
-#define M_El 2.718281828459045235360287471352662498L /* e */
-#define M_LOG2El 1.442695040888963407359924681001892137L /* log 2e */
-#define M_LOG10El 0.434294481903251827651128918916605082L /* log 10e */
-#define M_LN2l 0.693147180559945309417232121458176568L /* log e2 */
-#define M_LN10l 2.302585092994045684017991454684364208L /* log e10 */
-#define M_PIl 3.141592653589793238462643383279502884L /* pi */
-#define M_PI_2l 1.570796326794896619231321691639751442L /* pi/2 */
-#define M_PI_4l 0.785398163397448309615660845819875721L /* pi/4 */
-#define M_1_PIl 0.318309886183790671537767526745028724L /* 1/pi */
-#define M_2_PIl 0.636619772367581343075535053490057448L /* 2/pi */
-#define M_2_SQRTPIl 1.128379167095512573896158903121545172L /* 2/sqrt(pi) */
-#define M_SQRT2l 1.414213562373095048801688724209698079L /* sqrt(2) */
-#define M_SQRT1_2l 0.707106781186547524400844362104849039L /* 1/sqrt(2) */
-#endif
-
-#if __BSD_VISIBLE
-#if 0
-/* Old value from 4.4BSD-Lite math.h; this is probably better. */
-#define HUGE HUGE_VAL
-#else
-#define HUGE MAXFLOAT
-#endif
-#endif /* __BSD_VISIBLE */
-
-/*
- * Most of these functions depend on the rounding mode and have the side
- * effect of raising floating-point exceptions, so they are not declared
- * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
- */
-
-/*
- * ANSI/POSIX
- */
-int __fpclassifyd(double) __pure2;
-int __fpclassifyf(float) __pure2;
-int __fpclassifyl(long double) __pure2;
-int __isfinitef(float) __pure2;
-int __isfinite(double) __pure2;
-int __isfinitel(long double) __pure2;
-int __isinff(float) __pure2;
-int __isinfl(long double) __pure2;
-int __isnanf(float) __pure2;
-int __isnanl(long double) __pure2;
-int __isnormalf(float) __pure2;
-int __isnormal(double) __pure2;
-int __isnormall(long double) __pure2;
-int __signbit(double) __pure2;
-int __signbitf(float) __pure2;
-int __signbitl(long double) __pure2;
-
-double acos(double);
-double asin(double);
-double atan(double);
-double atan2(double, double);
-double cos(double);
-double sin(double);
-double tan(double);
-
-double cosh(double);
-double sinh(double);
-double tanh(double);
-
-double exp(double);
-double frexp(double, int *); /* fundamentally !__pure2 */
-double ldexp(double, int);
-double log(double);
-double log10(double);
-double modf(double, double *); /* fundamentally !__pure2 */
-
-double pow(double, double);
-double sqrt(double);
-
-double ceil(double);
-double fabs(double) __pure2;
-__BIONIC_MATH_INLINE(double fabs(double x) { return __builtin_fabs(x); })
-double floor(double);
-double fmod(double, double);
-
-/*
- * These functions are not in C90.
- */
-#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE
-double acosh(double);
-double asinh(double);
-double atanh(double);
-double cbrt(double);
-double erf(double);
-double erfc(double);
-double exp2(double);
-double expm1(double);
-double fma(double, double, double);
-double hypot(double, double);
-int ilogb(double) __pure2;
-int (isinf)(double) __pure2;
-int (isnan)(double) __pure2;
-double lgamma(double);
-long long llrint(double);
-long long llround(double);
-double log1p(double);
-double log2(double);
-double logb(double);
-long lrint(double);
-long lround(double);
-double nan(const char *) __pure2;
-double nextafter(double, double);
-double remainder(double, double);
-double remquo(double, double, int *);
-double rint(double);
-#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
-
-#if __BSD_VISIBLE || __XSI_VISIBLE
-double j0(double);
-double j1(double);
-double jn(int, double);
-double y0(double);
-double y1(double);
-double yn(int, double);
-
-#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
-double gamma(double);
-#endif
-
-#if __XSI_VISIBLE <= 600 || __BSD_VISIBLE
-double scalb(double, double);
-#endif
-#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
-
-#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
-double copysign(double, double) __pure2;
-double fdim(double, double);
-double fmax(double, double) __pure2;
-double fmin(double, double) __pure2;
-double nearbyint(double);
-double round(double);
-double scalbln(double, long);
-double scalbn(double, int);
-double tgamma(double);
-double trunc(double);
-#endif
-
-/*
- * BSD math library entry points
- */
-#if __BSD_VISIBLE
-double drem(double, double);
-int finite(double) __pure2;
-int isnanf(float) __pure2;
-long double significandl(long double);
-
-/*
- * Reentrant version of gamma & lgamma; passes signgam back by reference
- * as the second argument; user must allocate space for signgam.
- */
-double gamma_r(double, int *);
-double lgamma_r(double, int *);
-
-/*
- * IEEE Test Vector
- */
-double significand(double);
-#endif /* __BSD_VISIBLE */
-
-/* float versions of ANSI/POSIX functions */
-#if __ISO_C_VISIBLE >= 1999
-float acosf(float);
-float asinf(float);
-float atanf(float);
-float atan2f(float, float);
-float cosf(float);
-float sinf(float);
-float tanf(float);
-
-float coshf(float);
-float sinhf(float);
-float tanhf(float);
-
-float exp2f(float);
-float expf(float);
-float expm1f(float);
-float frexpf(float, int *); /* fundamentally !__pure2 */
-int ilogbf(float) __pure2;
-float ldexpf(float, int);
-float log10f(float);
-float log1pf(float);
-float log2f(float);
-float logf(float);
-float modff(float, float *); /* fundamentally !__pure2 */
-
-float powf(float, float);
-float sqrtf(float);
-
-float ceilf(float);
-float fabsf(float) __pure2;
-__BIONIC_MATH_INLINE(float fabsf(float x) { return __builtin_fabsf(x); })
-float floorf(float);
-float fmodf(float, float);
-float roundf(float);
-
-float erff(float);
-float erfcf(float);
-float hypotf(float, float);
-float lgammaf(float);
-float tgammaf(float);
-
-float acoshf(float);
-float asinhf(float);
-float atanhf(float);
-float cbrtf(float);
-float logbf(float);
-float copysignf(float, float) __pure2;
-long long llrintf(float);
-long long llroundf(float);
-long lrintf(float);
-long lroundf(float);
-float nanf(const char *) __pure2;
-float nearbyintf(float);
-float nextafterf(float, float);
-float remainderf(float, float);
-float remquof(float, float, int *);
-float rintf(float);
-float scalblnf(float, long);
-float scalbnf(float, int);
-float truncf(float);
-
-float fdimf(float, float);
-float fmaf(float, float, float);
-float fmaxf(float, float) __pure2;
-float fminf(float, float) __pure2;
-#endif
-
-/*
- * float versions of BSD math library entry points
- */
-#if __BSD_VISIBLE
-float dremf(float, float);
-int finitef(float) __pure2;
-float gammaf(float);
-float j0f(float);
-float j1f(float);
-float jnf(int, float);
-float scalbf(float, float);
-float y0f(float);
-float y1f(float);
-float ynf(int, float);
-
-/*
- * Float versions of reentrant version of gamma & lgamma; passes
- * signgam back by reference as the second argument; user must
- * allocate space for signgam.
- */
-float gammaf_r(float, int *);
-float lgammaf_r(float, int *);
-
-/*
- * float version of IEEE Test Vector
- */
-float significandf(float);
-#endif /* __BSD_VISIBLE */
-
-/*
- * long double versions of ISO/POSIX math functions
- */
-#if __ISO_C_VISIBLE >= 1999
-long double acoshl(long double);
-long double acosl(long double);
-long double asinhl(long double);
-long double asinl(long double);
-long double atan2l(long double, long double);
-long double atanhl(long double);
-long double atanl(long double);
-long double cbrtl(long double);
-long double ceill(long double);
-long double copysignl(long double, long double) __pure2;
-long double coshl(long double);
-long double cosl(long double);
-long double erfcl(long double);
-long double erfl(long double);
-long double exp2l(long double);
-long double expl(long double);
-long double expm1l(long double);
-long double fabsl(long double) __pure2;
-__BIONIC_MATH_INLINE(long double fabsl(long double x) { return __builtin_fabsl(x); })
-long double fdiml(long double, long double);
-long double floorl(long double);
-long double fmal(long double, long double, long double);
-long double fmaxl(long double, long double) __pure2;
-long double fminl(long double, long double) __pure2;
-long double fmodl(long double, long double);
-long double frexpl(long double value, int *); /* fundamentally !__pure2 */
-long double hypotl(long double, long double);
-int ilogbl(long double) __pure2;
-long double ldexpl(long double, int);
-long double lgammal(long double);
-long long llrintl(long double);
-long long llroundl(long double);
-long double log10l(long double);
-long double log1pl(long double);
-long double log2l(long double);
-long double logbl(long double);
-long double logl(long double);
-long lrintl(long double);
-long lroundl(long double);
-long double modfl(long double, long double *); /* fundamentally !__pure2 */
-long double nanl(const char *) __pure2;
-long double nearbyintl(long double);
-long double nextafterl(long double, long double);
-double nexttoward(double, long double);
-float nexttowardf(float, long double);
-long double nexttowardl(long double, long double);
-long double powl(long double, long double);
-long double remainderl(long double, long double);
-long double remquol(long double, long double, int *);
-long double rintl(long double);
-long double roundl(long double);
-long double scalblnl(long double, long);
-long double scalbnl(long double, int);
-long double sinhl(long double);
-long double sinl(long double);
-long double sqrtl(long double);
-long double tanhl(long double);
-long double tanl(long double);
-long double tgammal(long double);
-long double truncl(long double);
-#endif /* __ISO_C_VISIBLE >= 1999 */
-
-#if __BSD_VISIBLE
-long double lgammal_r(long double, int *);
-#endif
-
-#if defined(__USE_GNU)
-void sincos(double, double*, double*);
-void sincosf(float, float*, float*);
-void sincosl(long double, long double*, long double*);
-#endif /* __USE_GNU */
-
-#pragma GCC visibility pop
-__END_DECLS
-
-#endif /* !_MATH_H_ */
diff --git a/libm/include/mips/machine/fenv.h b/libm/include/mips/machine/fenv.h
deleted file mode 100644
index 689e1cb..0000000
--- a/libm/include/mips/machine/fenv.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*-
- * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/msun/arm/fenv.h,v 1.5 2005/03/16 19:03:45 das Exp $
- */
-
-/*
- Rewritten for Android.
-*/
-
-/* MIPS FPU floating point control register bits.
- *
- * 31-25 -> floating point conditions code bits set by FP compare
- * instructions
- * 24 -> flush denormalized results to zero instead of
- * causing unimplemented operation exception.
- * 23 -> Condition bit
- * 22 -> In conjunction with FS detects denormalized
- * operands and replaces them internally with 0.
- * 21 -> In conjunction with FS forces denormalized operands
- * to the closest normalized value.
- * 20-18 -> reserved (read as 0, write with 0)
- * 17 -> cause bit for unimplemented operation
- * 16 -> cause bit for invalid exception
- * 15 -> cause bit for division by zero exception
- * 14 -> cause bit for overflow exception
- * 13 -> cause bit for underflow exception
- * 12 -> cause bit for inexact exception
- * 11 -> enable exception for invalid exception
- * 10 -> enable exception for division by zero exception
- * 9 -> enable exception for overflow exception
- * 8 -> enable exception for underflow exception
- * 7 -> enable exception for inexact exception
- * 6 -> flag invalid exception
- * 5 -> flag division by zero exception
- * 4 -> flag overflow exception
- * 3 -> flag underflow exception
- * 2 -> flag inexact exception
- * 1-0 -> rounding control
- *
- *
- * Rounding Control:
- * 00 - rounding to nearest (RN)
- * 01 - rounding toward zero (RZ)
- * 10 - rounding (up) toward plus infinity (RP)
- * 11 - rounding (down)toward minus infinity (RM)
- */
-
-#ifndef _MIPS_FENV_H_
-#define _MIPS_FENV_H_
-
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-typedef __uint32_t fenv_t;
-typedef __uint32_t fexcept_t;
-
-/* Exception flags */
-#define FE_INVALID 0x40
-#define FE_DIVBYZERO 0x20
-#define FE_OVERFLOW 0x10
-#define FE_UNDERFLOW 0x08
-#define FE_INEXACT 0x04
-#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \
- FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
-
-/* Rounding modes */
-#define FE_TONEAREST 0x0000
-#define FE_TOWARDZERO 0x0001
-#define FE_UPWARD 0x0002
-#define FE_DOWNWARD 0x0003
-
-__END_DECLS
-
-#endif /* !_MIPS_FENV_H_ */