<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br></div>I ran the script and made a few changes <br></div>but there are errors in the soft float.<br></div>I have attached the logs with the mail.<br><br></div>the error is coming due to no definition of the function __softfloat_float_raise <br></div>I searched in freebsd for the definition but couldn't find any thing.<br><br></div>Thanks <br></div>-eshan <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 23, 2020 at 11:27 PM Eshan Dhawan <<a href="mailto:eshandhawan51@gmail.com">eshandhawan51@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hello Dr Joel,<br></div>I ran the script, The logs show error in soft float variants and don't show there exe files as well. <br></div>I have attached the log file. <br><br></div><div>Thanks <br></div><div>-Eshan <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 23, 2020 at 10:29 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">This is both a holiday weekend and my birthday weekend. I won't get a chance to review this for a bit.<div><br></div><div>But I am attaching a simple shell script and test program which iterates over all multilib variants, compiles a simple program which should end up linking against every multilib variant. If the script looks right, then this should prove useful in the future.</div><div><br></div><div>Please check that the right set of exe's for the various multilib options is generated and the fenv code is code for each. My parsing of the multilib variants from gcc needs a double check.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 22, 2020 at 6:36 PM Eshan dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank">eshandhawan51@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This patch adds FENV support for ARM<br>
<br>
The code is ported from FreeBSD.<br>
<br>
Signed-off-by: Eshan dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank">eshandhawan51@gmail.com</a>><br>
---<br>
newlib/libc/machine/arm/machine/acle-compat.h | 182 ++++++++++<br>
newlib/libc/machine/arm/machine/fenv-mangle.h | 53 +++<br>
.../libc/machine/arm/machine/fenv-softfloat.h | 187 ++++++++++<br>
newlib/libc/machine/arm/machine/fenv-vfp.h | 187 ++++++++++<br>
newlib/libc/machine/arm/sys/fenv.h | 122 +++++++<br>
newlib/libm/machine/arm/Makefile.am | 18 +-<br>
newlib/libm/machine/arm/Makefile.in | 174 +++++++++-<br>
newlib/libm/machine/arm/fe_dfl_env.c | 7 +<br>
newlib/libm/machine/arm/feclearexcept.c | 7 +<br>
newlib/libm/machine/arm/fegetenv.c | 7 +<br>
newlib/libm/machine/arm/fegetexceptflag.c | 7 +<br>
newlib/libm/machine/arm/fegetround.c | 7 +<br>
newlib/libm/machine/arm/feholdexcept.c | 7 +<br>
newlib/libm/machine/arm/fenv-softfp.c | 32 ++<br>
newlib/libm/machine/arm/fenv-vfp.c | 32 ++<br>
newlib/libm/machine/arm/fenv.c | 328 ++++++++++++++++++<br>
newlib/libm/machine/arm/feraiseexcept.c | 7 +<br>
newlib/libm/machine/arm/fesetenv.c | 7 +<br>
newlib/libm/machine/arm/fesetexceptflag.c | 7 +<br>
newlib/libm/machine/arm/fesetround.c | 7 +<br>
newlib/libm/machine/arm/fetestexcept.c | 7 +<br>
newlib/libm/machine/arm/feupdateenv.c | 7 +<br>
22 files changed, 1380 insertions(+), 19 deletions(-)<br>
create mode 100644 newlib/libc/machine/arm/machine/acle-compat.h<br>
create mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h<br>
create mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h<br>
create mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h<br>
create mode 100644 newlib/libc/machine/arm/sys/fenv.h<br>
create mode 100644 newlib/libm/machine/arm/fe_dfl_env.c<br>
create mode 100644 newlib/libm/machine/arm/feclearexcept.c<br>
create mode 100644 newlib/libm/machine/arm/fegetenv.c<br>
create mode 100644 newlib/libm/machine/arm/fegetexceptflag.c<br>
create mode 100644 newlib/libm/machine/arm/fegetround.c<br>
create mode 100644 newlib/libm/machine/arm/feholdexcept.c<br>
create mode 100644 newlib/libm/machine/arm/fenv-softfp.c<br>
create mode 100644 newlib/libm/machine/arm/fenv-vfp.c<br>
create mode 100644 newlib/libm/machine/arm/fenv.c<br>
create mode 100644 newlib/libm/machine/arm/feraiseexcept.c<br>
create mode 100644 newlib/libm/machine/arm/fesetenv.c<br>
create mode 100644 newlib/libm/machine/arm/fesetexceptflag.c<br>
create mode 100644 newlib/libm/machine/arm/fesetround.c<br>
create mode 100644 newlib/libm/machine/arm/fetestexcept.c<br>
create mode 100644 newlib/libm/machine/arm/feupdateenv.c<br>
<br>
diff --git a/newlib/libc/machine/arm/machine/acle-compat.h b/newlib/libc/machine/arm/machine/acle-compat.h<br>
new file mode 100644<br>
index 000000000..888ae2ea8<br>
--- /dev/null<br>
+++ b/newlib/libc/machine/arm/machine/acle-compat.h<br>
@@ -0,0 +1,182 @@<br>
+/*<br>
+ * Copyright (c) 2014 ARM Ltd<br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ * 3. The name of the company may not be used to endorse or promote<br>
+ * products derived from this software without specific prior written<br>
+ * permission.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED<br>
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF<br>
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.<br>
+ * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,<br>
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED<br>
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR<br>
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF<br>
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br>
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br>
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br>
+ */<br>
+<br>
+#ifndef __ARM_ARCH<br>
+<br>
+/* ACLE standardises a set of pre-defines that describe the ARM architecture.<br>
+ These were mostly implemented in GCC around GCC-4.8; older versions<br>
+ have no, or only partial support. To provide a level of backwards<br>
+ compatibility we try to work out what the definitions should be, given<br>
+ the older pre-defines that GCC did produce. This isn't complete, but<br>
+ it should be enough for use by routines that depend on this header. */<br>
+<br>
+/* No need to handle ARMv8, GCC had ACLE support before that. */<br>
+<br>
+# ifdef __ARM_ARCH_7__<br>
+/* The common subset of ARMv7 in all profiles. */<br>
+# define __ARM_ARCH 7<br>
+# define __ARM_ARCH_ISA_THUMB 2<br>
+# define __ARM_FEATURE_CLZ<br>
+# define __ARM_FEATURE_LDREX 7<br>
+# define __ARM_FEATURE_UNALIGNED<br>
+# endif<br>
+<br>
+# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__)<br>
+# define __ARM_ARCH 7<br>
+# define __ARM_ARCH_ISA_THUMB 2<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# define __ARM_FEATURE_CLZ<br>
+# define __ARM_FEATURE_SIMD32<br>
+# define __ARM_FEATURE_DSP<br>
+# define __ARM_FEATURE_QBIT<br>
+# define __ARM_FEATURE_SAT<br>
+# define __ARM_FEATURE_LDREX 15<br>
+# define __ARM_FEATURE_UNALIGNED<br>
+# ifdef __ARM_ARCH_7A__<br>
+# define __ARM_ARCH_PROFILE 'A'<br>
+# else<br>
+# define __ARM_ARCH_PROFILE 'R'<br>
+# endif<br>
+# endif<br>
+<br>
+# ifdef __ARM_ARCH_7EM__<br>
+# define __ARM_ARCH 7<br>
+# define __ARM_ARCH_ISA_THUMB 2<br>
+# define __ARM_FEATURE_CLZ<br>
+# define __ARM_FEATURE_SIMD32<br>
+# define __ARM_FEATURE_DSP<br>
+# define __ARM_FEATURE_QBIT<br>
+# define __ARM_FEATURE_SAT<br>
+# define __ARM_FEATURE_LDREX 7<br>
+# define __ARM_FEATURE_UNALIGNED<br>
+# define __ARM_ARCH_PROFILE 'M'<br>
+# endif<br>
+<br>
+# ifdef __ARM_ARCH_7M__<br>
+# define __ARM_ARCH 7<br>
+# define __ARM_ARCH_ISA_THUMB 2<br>
+# define __ARM_FEATURE_CLZ<br>
+# define __ARM_FEATURE_QBIT<br>
+# define __ARM_FEATURE_SAT<br>
+# define __ARM_FEATURE_LDREX 7<br>
+# define __ARM_FEATURE_UNALIGNED<br>
+# define __ARM_ARCH_PROFILE 'M'<br>
+# endif<br>
+<br>
+# ifdef __ARM_ARCH_6T2__<br>
+# define __ARM_ARCH 6<br>
+# define __ARM_ARCH_ISA_THUMB 2<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# define __ARM_FEATURE_CLZ<br>
+# define __ARM_FEATURE_SIMD32<br>
+# define __ARM_FEATURE_DSP<br>
+# define __ARM_FEATURE_QBIT<br>
+# define __ARM_FEATURE_SAT<br>
+# define __ARM_FEATURE_LDREX 4<br>
+# define __ARM_FEATURE_UNALIGNED<br>
+# endif<br>
+<br>
+# ifdef __ARM_ARCH_6M__<br>
+# define __ARM_ARCH 6<br>
+# define __ARM_ARCH_ISA_THUMB 1<br>
+# define __ARM_ARCH_PROFILE 'M'<br>
+# endif<br>
+<br>
+# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \<br>
+ || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \<br>
+ || defined (__ARM_ARCH_6ZK__)<br>
+# define __ARM_ARCH 6<br>
+# define __ARM_ARCH_ISA_THUMB 1<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# define __ARM_FEATURE_CLZ<br>
+# define __ARM_FEATURE_SIMD32<br>
+# define __ARM_FEATURE_DSP<br>
+# define __ARM_FEATURE_QBIT<br>
+# define __ARM_FEATURE_SAT<br>
+# define __ARM_FEATURE_UNALIGNED<br>
+# ifndef __thumb__<br>
+# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__)<br>
+# define __ARM_FEATURE_LDREX 15<br>
+# else<br>
+# define __ARM_FEATURE_LDREX 4<br>
+# endif<br>
+# endif<br>
+# endif<br>
+<br>
+# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__)<br>
+# define __ARM_ARCH 5<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# ifdef __ARM_ARCH_5TE__<br>
+# define __ARM_ARCH_ISA_THUMB 1<br>
+# endif<br>
+# define __ARM_FEATURE_CLZ<br>
+# define __ARM_FEATURE_DSP<br>
+# endif<br>
+<br>
+# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__)<br>
+# define __ARM_ARCH 5<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# ifdef __ARM_ARCH_5TE__<br>
+# define __ARM_ARCH_ISA_THUMB 1<br>
+# endif<br>
+# define __ARM_FEATURE_CLZ<br>
+# endif<br>
+<br>
+# ifdef __ARM_ARCH_4T__<br>
+# define __ARM_ARCH 4<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# define __ARM_ARCH_ISA_THUMB 1<br>
+# endif<br>
+<br>
+# ifdef __ARM_ARCH_4__<br>
+# define __ARM_ARCH 4<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# endif<br>
+<br>
+# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__)<br>
+# define __ARM_ARCH 3<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# endif<br>
+<br>
+# ifdef __ARM_ARCH_2__<br>
+# define __ARM_ARCH 2<br>
+# define __ARM_ARCH_ISA_ARM<br>
+# endif<br>
+<br>
+# ifdef __ARMEB__<br>
+# define __ARM_BIG_ENDIAN<br>
+# endif<br>
+<br>
+/* If we still don't know what the target architecture is, then we're<br>
+ probably not using GCC. */<br>
+# ifndef __ARM_ARCH<br>
+# error Unable to determine architecture version.<br>
+# endif<br>
+<br>
+#endif /* __ARM_ARCH */<br>
+<br>
diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h b/newlib/libc/machine/arm/machine/fenv-mangle.h<br>
new file mode 100644<br>
index 000000000..476f7b20c<br>
--- /dev/null<br>
+++ b/newlib/libc/machine/arm/machine/fenv-mangle.h<br>
@@ -0,0 +1,53 @@<br>
+/*-<br>
+ * Copyright (c) 2013 Andrew Turner <andrew@FreeBSD.ORG><br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND<br>
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE<br>
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br>
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<br>
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<br>
+ * SUCH DAMAGE.<br>
+ *<br>
+ * $FreeBSD$<br>
+ */<br>
+<br>
+#ifdef _FENV_MANGLE_H_<br>
+#error Only include fenv-mangle.h once<br>
+#endif<br>
+<br>
+#define _FENV_MANGLE_H_<br>
+<br>
+#ifndef FENV_MANGLE<br>
+#error FENV_MANGLE is undefined<br>
+#endif<br>
+<br>
+#define feclearexcept FENV_MANGLE(feclearexcept)<br>
+#define fegetexceptflag FENV_MANGLE(fegetexceptflag)<br>
+#define fesetexceptflag FENV_MANGLE(fesetexceptflag)<br>
+#define feraiseexcept FENV_MANGLE(feraiseexcept)<br>
+#define fetestexcept FENV_MANGLE(fetestexcept)<br>
+#define fegetround FENV_MANGLE(fegetround)<br>
+#define fesetround FENV_MANGLE(fesetround)<br>
+#define fegetenv FENV_MANGLE(fegetenv)<br>
+#define feholdexcept FENV_MANGLE(feholdexcept)<br>
+#define fesetenv FENV_MANGLE(fesetenv)<br>
+#define feupdateenv FENV_MANGLE(feupdateenv)<br>
+#define feenableexcept FENV_MANGLE(feenableexcept)<br>
+#define fedisableexcept FENV_MANGLE(fedisableexcept)<br>
+#define fegetexcept FENV_MANGLE(fegetexcept)<br>
+<br>
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h b/newlib/libc/machine/arm/machine/fenv-softfloat.h<br>
new file mode 100644<br>
index 000000000..e53e54f54<br>
--- /dev/null<br>
+++ b/newlib/libc/machine/arm/machine/fenv-softfloat.h<br>
@@ -0,0 +1,187 @@<br>
+ /*-<br>
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD<br>
+ *<br>
+ * Copyright (c) 2004-2011 David Schultz <das@FreeBSD.ORG><br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND<br>
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE<br>
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br>
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<br>
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<br>
+ * SUCH DAMAGE.<br>
+ *<br>
+ * $FreeBSD$<br>
+ */<br>
+<br>
+#ifndef _SYS_FENV_H_<br>
+#error "This file is meant to be included only by <sys/fenv.h>."<br>
+#endif<br>
+/* the file can be added from architecture specific fenv.h file found in <br>
+ *libc/sys/arch/sys *<br>
+ *<br>
+ * This file implements the functionality of <fenv.h> on platforms that<br>
+ * lack an FPU and use softfloat in libc for floating point. To use it,<br>
+ * you must write an <fenv.h> that provides the following:<br>
+ *<br>
+ * - a typedef for fenv_t, which may be an integer or struct type<br>
+ * - a typedef for fexcept_t (XXX This file assumes fexcept_t is a<br>
+ * simple integer type containing the exception mask.)<br>
+ * - definitions of FE_* constants for the five exceptions and four<br>
+ * rounding modes in IEEE 754, as described in fenv(3)<br>
+ * - a definition, and the corresponding external symbol, for FE_DFL_ENV<br>
+ * - a macro __set_env(env, flags, mask, rnd), which sets the given fenv_t<br>
+ * from the exception flags, mask, and rounding mode<br>
+ * - macros __env_flags(env), __env_mask(env), and __env_round(env), which<br>
+ * extract fields from an fenv_t<br>
+ * - a definition of __fenv_static<br>
+ *<br>
+ * If the architecture supports an optional FPU, it's recommended that you<br>
+ * define fenv_t and fexcept_t to match the hardware ABI. Otherwise, it<br>
+ * doesn't matter how you define them.<br>
+ */<br>
+<br>
+extern int __softfloat_float_exception_flags;<br>
+extern int __softfloat_float_exception_mask;<br>
+extern int __softfloat_float_rounding_mode;<br>
+void __softfloat_float_raise(int);<br>
+<br>
+__fenv_static inline int<br>
+feclearexcept(int excepts)<br>
+{<br>
+<br>
+ __softfloat_float_exception_flags &= ~excepts;<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetexceptflag(fexcept_t *flagp, int excepts)<br>
+{<br>
+<br>
+ *flagp = __softfloat_float_exception_flags & excepts;<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fesetexceptflag(const fexcept_t *flagp, int excepts)<br>
+{<br>
+<br>
+ __softfloat_float_exception_flags &= ~excepts;<br>
+ __softfloat_float_exception_flags |= *flagp & excepts;<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+feraiseexcept(int excepts)<br>
+{<br>
+<br>
+ __softfloat_float_raise(excepts);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fetestexcept(int excepts)<br>
+{<br>
+<br>
+ return (__softfloat_float_exception_flags & excepts);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetround(void)<br>
+{<br>
+<br>
+ return (__softfloat_float_rounding_mode);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fesetround(int round)<br>
+{<br>
+<br>
+ __softfloat_float_rounding_mode = round;<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetenv(fenv_t *envp)<br>
+{<br>
+<br>
+ __set_env(*envp, __softfloat_float_exception_flags,<br>
+ __softfloat_float_exception_mask, __softfloat_float_rounding_mode);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+feholdexcept(fenv_t *envp)<br>
+{<br>
+ fenv_t __env;<br>
+<br>
+ fegetenv(envp);<br>
+ __softfloat_float_exception_flags = 0;<br>
+ __softfloat_float_exception_mask = 0;<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fesetenv(const fenv_t *envp)<br>
+{<br>
+<br>
+ __softfloat_float_exception_flags = __env_flags(*envp);<br>
+ __softfloat_float_exception_mask = __env_mask(*envp);<br>
+ __softfloat_float_rounding_mode = __env_round(*envp);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+feupdateenv(const fenv_t *envp)<br>
+{<br>
+ int __oflags = __softfloat_float_exception_flags;<br>
+<br>
+ fesetenv(envp);<br>
+ feraiseexcept(__oflags);<br>
+ return (0);<br>
+}<br>
+<br>
+#if __BSD_VISIBLE<br>
+<br>
+/* We currently provide no external definitions of the functions below. */<br>
+<br>
+__fenv_static inline int<br>
+feenableexcept(int __mask)<br>
+{<br>
+ int __omask = __softfloat_float_exception_mask;<br>
+<br>
+ __softfloat_float_exception_mask |= __mask;<br>
+ return (__omask);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fedisableexcept(int __mask)<br>
+{<br>
+ int __omask = __softfloat_float_exception_mask;<br>
+<br>
+ __softfloat_float_exception_mask &= ~__mask;<br>
+ return (__omask);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetexcept(void)<br>
+{<br>
+<br>
+ return (__softfloat_float_exception_mask);<br>
+}<br>
+<br>
+#endif /* __BSD_VISIBLE */<br>
diff --git a/newlib/libc/machine/arm/machine/fenv-vfp.h b/newlib/libc/machine/arm/machine/fenv-vfp.h<br>
new file mode 100644<br>
index 000000000..25d71f3ab<br>
--- /dev/null<br>
+++ b/newlib/libc/machine/arm/machine/fenv-vfp.h<br>
@@ -0,0 +1,187 @@<br>
+/*-<br>
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD<br>
+ *<br>
+ * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG><br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND<br>
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE<br>
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br>
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<br>
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<br>
+ * SUCH DAMAGE.<br>
+ *<br>
+ * $FreeBSD$<br>
+ */<br>
+<br>
+<br>
+<br>
+#define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r))<br>
+#define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r))<br>
+<br>
+<br>
+#define _FPU_MASK_SHIFT 8<br>
+<br>
+__fenv_static inline int feclearexcept(int excepts)<br>
+{<br>
+ fexcept_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ __fpsr &= ~excepts;<br>
+ vmsr_fpscr(__fpsr);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetexceptflag(fexcept_t *flagp, int excepts)<br>
+{<br>
+ fexcept_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ *flagp = __fpsr & excepts;<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fesetexceptflag(const fexcept_t *flagp, int excepts)<br>
+{<br>
+ fexcept_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ __fpsr &= ~excepts;<br>
+ __fpsr |= *flagp & excepts;<br>
+ vmsr_fpscr(__fpsr);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+feraiseexcept(int excepts)<br>
+{<br>
+ fexcept_t __ex = excepts;<br>
+<br>
+ fesetexceptflag(&__ex, excepts); /* XXX */<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fetestexcept(int excepts)<br>
+{<br>
+ fexcept_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ return (__fpsr & excepts);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetround(void)<br>
+{<br>
+ fenv_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ return (__fpsr & _ROUND_MASK);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fesetround(int round)<br>
+{<br>
+ fenv_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ __fpsr &= ~(_ROUND_MASK);<br>
+ __fpsr |= round;<br>
+ vmsr_fpscr(__fpsr);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetenv(fenv_t *envp)<br>
+{<br>
+<br>
+ vmrs_fpscr(*envp);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+feholdexcept(fenv_t *envp)<br>
+{<br>
+ fenv_t __env;<br>
+<br>
+ vmrs_fpscr(__env);<br>
+ *envp = __env;<br>
+ __env &= ~(FE_ALL_EXCEPT);<br>
+ vmsr_fpscr(__env);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fesetenv(const fenv_t *envp)<br>
+{<br>
+<br>
+ vmsr_fpscr(*envp);<br>
+ return (0);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+feupdateenv(const fenv_t *envp)<br>
+{<br>
+ fexcept_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ vmsr_fpscr(*envp);<br>
+ feraiseexcept(__fpsr & FE_ALL_EXCEPT);<br>
+ return (0);<br>
+}<br>
+<br>
+#if __BSD_VISIBLE<br>
+<br>
+/* We currently provide no external definitions of the functions below. */<br>
+<br>
+__fenv_static inline int<br>
+feenableexcept(int __mask)<br>
+{<br>
+ fenv_t __old_fpsr, __new_fpsr;<br>
+<br>
+ vmrs_fpscr(__old_fpsr);<br>
+ __new_fpsr = __old_fpsr |<br>
+ ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT);<br>
+ vmsr_fpscr(__new_fpsr);<br>
+ return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fedisableexcept(int __mask)<br>
+{<br>
+ fenv_t __old_fpsr, __new_fpsr;<br>
+<br>
+ vmrs_fpscr(__old_fpsr);<br>
+ __new_fpsr = __old_fpsr &<br>
+ ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT);<br>
+ vmsr_fpscr(__new_fpsr);<br>
+ return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT);<br>
+}<br>
+<br>
+__fenv_static inline int<br>
+fegetexcept(void)<br>
+{<br>
+ fenv_t __fpsr;<br>
+<br>
+ vmrs_fpscr(__fpsr);<br>
+ return (__fpsr & FE_ALL_EXCEPT);<br>
+}<br>
+<br>
+#endif /* __BSD_VISIBLE */<br>
+<br>
diff --git a/newlib/libc/machine/arm/sys/fenv.h b/newlib/libc/machine/arm/sys/fenv.h<br>
new file mode 100644<br>
index 000000000..af74c5f47<br>
--- /dev/null<br>
+++ b/newlib/libc/machine/arm/sys/fenv.h<br>
@@ -0,0 +1,122 @@<br>
+/*-<br>
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD<br>
+ *<br>
+ * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG><br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND<br>
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE<br>
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br>
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<br>
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<br>
+ * SUCH DAMAGE.<br>
+ *<br>
+ * $FreeBSD$<br>
+ */<br>
+<br>
+#ifndef _SYS_FENV_H_<br>
+#define _SYS_FENV_H_ 1<br>
+<br>
+#include <sys/_types.h><br>
+#include <sys/cdefs.h><br>
+<br>
+#ifdef __cplusplus<br>
+extern "C" {<br>
+#endif<br>
+<br>
+#ifndef __fenv_static<br>
+#define __fenv_static static<br>
+#endif<br>
+<br>
+typedef int fenv_t;<br>
+typedef int fexcept_t;<br>
+<br>
+/* Exception flags */<br>
+#define FE_INVALID 0x0001<br>
+#define FE_DIVBYZERO 0x0002<br>
+#define FE_OVERFLOW 0x0004<br>
+#define FE_UNDERFLOW 0x0008<br>
+#define FE_INEXACT 0x0010<br>
+#ifdef __ARM_PCS_VFP<br>
+#define FE_DENORMAL 0x0080<br>
+#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \<br>
+ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL)<br>
+#else<br>
+#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \<br>
+ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)<br>
+#endif<br>
+<br>
+<br>
+<br>
+/* Rounding modes */<br>
+#define VFP_FE_TONEAREST 0x00000000<br>
+#define VFP_FE_UPWARD 0x00400000<br>
+#define VFP_FE_DOWNWARD 0x00800000<br>
+#define VFP_FE_TOWARDZERO 0x00c00000<br>
+<br>
+#ifdef __ARM_PCS_VFP<br>
+#define FE_TONEAREST VFP_FE_TONEAREST<br>
+#define FE_UPWARD VFP_FE_UPWARD<br>
+#define FE_DOWNWARD VFP_FE_DOWNWARD<br>
+#define FE_TOWARDZERO VFP_FE_TOWARDZERO<br>
+#else<br>
+#define FE_TONEAREST 0x0000<br>
+#define FE_TOWARDZERO 0x0001<br>
+#define FE_UPWARD 0x0002<br>
+#define FE_DOWNWARD 0x0003<br>
+#endif<br>
+#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \<br>
+ FE_UPWARD | FE_TOWARDZERO)<br>
+<br>
+<br>
+/* Default floating-point environment */<br>
+<br>
+extern const fenv_t *_fe_dfl_env;<br>
+#define FE_DFL_ENV (_fe_dfl_env)<br>
+<br>
+/* We need to be able to map status flag positions to mask flag positions */<br>
+#ifndef __ARM_PCS_VFP<br>
+#define _FPUSW_SHIFT 16<br>
+#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT)<br>
+#endif<br>
+<br>
+#ifndef __ARM_PCS_VFP<br>
+<br>
+int feclearexcept(int excepts);<br>
+int fegetexceptflag(fexcept_t *flagp, int excepts);<br>
+int fesetexceptflag(const fexcept_t *flagp, int excepts);<br>
+int feraiseexcept(int excepts);<br>
+int fetestexcept(int excepts);<br>
+int fegetround(void);<br>
+int fesetround(int round);<br>
+int fegetenv(fenv_t *envp);<br>
+int feholdexcept(fenv_t *envp);<br>
+int fesetenv(const fenv_t *envp);<br>
+int feupdateenv(const fenv_t *envp);<br>
+#if __BSD_VISIBLE<br>
+int feenableexcept(int __mask);<br>
+int fedisableexcept(int __mask);<br>
+int fegetexcept(void);<br>
+#endif /* __BSD_VISIBLE */<br>
+<br>
+#endif /* __ARM_PCS_VFP */<br>
+<br>
+#ifdef __cplusplus<br>
+}<br>
+#endif<br>
+<br>
+#endif /* _SYS_FENV_H_ */<br>
diff --git a/newlib/libm/machine/arm/Makefile.am b/newlib/libm/machine/arm/Makefile.am<br>
index 1f10a7a40..a64ee59d5 100644<br>
--- a/newlib/libm/machine/arm/Makefile.am<br>
+++ b/newlib/libm/machine/arm/Makefile.am<br>
@@ -19,7 +19,23 @@ LIB_SOURCES = \<br>
sf_nearbyint.c \<br>
sf_rint.c \<br>
sf_round.c \<br>
- sf_trunc.c<br>
+ sf_trunc.c \<br>
+ feclearexcept.c \<br>
+ fe_dfl_env.c\<br>
+ fegetenv.c \<br>
+ fegetexceptflag.c \<br>
+ fegetround.c \<br>
+ feholdexcept.c \<br>
+ fenv.c \<br>
+ feraiseexcept.c \<br>
+ fesetenv.c \<br>
+ fesetexceptflag.c \<br>
+ fesetround.c \<br>
+ fetestexcept.c \<br>
+ feupdateenv.c \<br>
+ fenv-vfp.c \<br>
+ fenv-softfp.c<br>
+<br>
<br>
noinst_LIBRARIES = lib.a<br>
lib_a_SOURCES = $(LIB_SOURCES)<br>
diff --git a/newlib/libm/machine/arm/Makefile.in b/newlib/libm/machine/arm/Makefile.in<br>
index 0a5a27327..70b03df46 100644<br>
--- a/newlib/libm/machine/arm/Makefile.in<br>
+++ b/newlib/libm/machine/arm/Makefile.in<br>
@@ -1,9 +1,8 @@<br>
-# Makefile.in generated by automake 1.11.6 from Makefile.am.<br>
+# Makefile.in generated by automake 1.12.6 from Makefile.am.<br>
# @configure_input@<br>
<br>
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,<br>
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software<br>
-# Foundation, Inc.<br>
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.<br>
+<br>
# This Makefile.in is free software; the Free Software Foundation<br>
# gives unlimited permission to copy and/or distribute it,<br>
# with or without modifications, as long as this notice is preserved.<br>
@@ -54,7 +53,7 @@ build_triplet = @build@<br>
host_triplet = @host@<br>
DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \<br>
$(srcdir)/Makefile.am $(top_srcdir)/configure \<br>
- $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs<br>
+ $(am__configure_deps) $(top_srcdir)/../../../../mkinstalldirs<br>
subdir = .<br>
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4<br>
am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \<br>
@@ -76,7 +75,15 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) lib_a-ef_sqrt.$(OBJEXT) \<br>
lib_a-s_round.$(OBJEXT) lib_a-s_trunc.$(OBJEXT) \<br>
lib_a-sf_ceil.$(OBJEXT) lib_a-sf_floor.$(OBJEXT) \<br>
lib_a-sf_nearbyint.$(OBJEXT) lib_a-sf_rint.$(OBJEXT) \<br>
- lib_a-sf_round.$(OBJEXT) lib_a-sf_trunc.$(OBJEXT)<br>
+ lib_a-sf_round.$(OBJEXT) lib_a-sf_trunc.$(OBJEXT) \<br>
+ lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \<br>
+ lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \<br>
+ lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \<br>
+ lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \<br>
+ lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \<br>
+ lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \<br>
+ lib_a-feupdateenv.$(OBJEXT) lib_a-fenv-vfp.$(OBJEXT) \<br>
+ lib_a-fenv-softfp.$(OBJEXT)<br>
am_lib_a_OBJECTS = $(am__objects_1)<br>
lib_a_OBJECTS = $(am_lib_a_OBJECTS)<br>
DEFAULT_INCLUDES = -I.@am__isrc@<br>
@@ -95,6 +102,8 @@ am__can_run_installinfo = \<br>
DATA = $(noinst_DATA)<br>
ETAGS = etags<br>
CTAGS = ctags<br>
+CSCOPE = cscope<br>
+AM_RECURSIVE_TARGETS = cscope<br>
ACLOCAL = @ACLOCAL@<br>
AMTAR = @AMTAR@<br>
AR = @AR@<br>
@@ -216,7 +225,22 @@ LIB_SOURCES = \<br>
sf_nearbyint.c \<br>
sf_rint.c \<br>
sf_round.c \<br>
- sf_trunc.c<br>
+ sf_trunc.c \<br>
+ feclearexcept.c \<br>
+ fe_dfl_env.c\<br>
+ fegetenv.c \<br>
+ fegetexceptflag.c \<br>
+ fegetround.c \<br>
+ feholdexcept.c \<br>
+ fenv.c \<br>
+ feraiseexcept.c \<br>
+ fesetenv.c \<br>
+ fesetexceptflag.c \<br>
+ fesetround.c \<br>
+ fetestexcept.c \<br>
+ feupdateenv.c \<br>
+ fenv-vfp.c \<br>
+ fenv-softfp.c<br>
<br>
noinst_LIBRARIES = lib.a<br>
lib_a_SOURCES = $(LIB_SOURCES)<br>
@@ -378,6 +402,96 @@ lib_a-sf_trunc.o: sf_trunc.c<br>
lib_a-sf_trunc.obj: sf_trunc.c<br>
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_trunc.obj `if test -f 'sf_trunc.c'; then $(CYGPATH_W) 'sf_trunc.c'; else $(CYGPATH_W) '$(srcdir)/sf_trunc.c'; fi`<br>
<br>
+lib_a-feclearexcept.o: feclearexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c<br>
+<br>
+lib_a-feclearexcept.obj: feclearexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi`<br>
+<br>
+lib_a-fe_dfl_env.o: fe_dfl_env.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fe_dfl_env.o `test -f 'fe_dfl_env.c' || echo '$(srcdir)/'`fe_dfl_env.c<br>
+<br>
+lib_a-fe_dfl_env.obj: fe_dfl_env.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fe_dfl_env.obj `if test -f 'fe_dfl_env.c'; then $(CYGPATH_W) 'fe_dfl_env.c'; else $(CYGPATH_W) '$(srcdir)/fe_dfl_env.c'; fi`<br>
+<br>
+lib_a-fegetenv.o: fegetenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c<br>
+<br>
+lib_a-fegetenv.obj: fegetenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi`<br>
+<br>
+lib_a-fegetexceptflag.o: fegetexceptflag.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c<br>
+<br>
+lib_a-fegetexceptflag.obj: fegetexceptflag.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi`<br>
+<br>
+lib_a-fegetround.o: fegetround.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c<br>
+<br>
+lib_a-fegetround.obj: fegetround.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi`<br>
+<br>
+lib_a-feholdexcept.o: feholdexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c<br>
+<br>
+lib_a-feholdexcept.obj: feholdexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi`<br>
+<br>
+lib_a-fenv.o: fenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c<br>
+<br>
+lib_a-fenv.obj: fenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi`<br>
+<br>
+lib_a-feraiseexcept.o: feraiseexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c<br>
+<br>
+lib_a-feraiseexcept.obj: feraiseexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi`<br>
+<br>
+lib_a-fesetenv.o: fesetenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c<br>
+<br>
+lib_a-fesetenv.obj: fesetenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi`<br>
+<br>
+lib_a-fesetexceptflag.o: fesetexceptflag.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c<br>
+<br>
+lib_a-fesetexceptflag.obj: fesetexceptflag.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi`<br>
+<br>
+lib_a-fesetround.o: fesetround.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c<br>
+<br>
+lib_a-fesetround.obj: fesetround.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi`<br>
+<br>
+lib_a-fetestexcept.o: fetestexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c<br>
+<br>
+lib_a-fetestexcept.obj: fetestexcept.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi`<br>
+<br>
+lib_a-feupdateenv.o: feupdateenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c<br>
+<br>
+lib_a-feupdateenv.obj: feupdateenv.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi`<br>
+<br>
+lib_a-fenv-vfp.o: fenv-vfp.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-vfp.o `test -f 'fenv-vfp.c' || echo '$(srcdir)/'`fenv-vfp.c<br>
+<br>
+lib_a-fenv-vfp.obj: fenv-vfp.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-vfp.obj `if test -f 'fenv-vfp.c'; then $(CYGPATH_W) 'fenv-vfp.c'; else $(CYGPATH_W) '$(srcdir)/fenv-vfp.c'; fi`<br>
+<br>
+lib_a-fenv-softfp.o: fenv-softfp.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-softfp.o `test -f 'fenv-softfp.c' || echo '$(srcdir)/'`fenv-softfp.c<br>
+<br>
+lib_a-fenv-softfp.obj: fenv-softfp.c<br>
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-softfp.obj `if test -f 'fenv-softfp.c'; then $(CYGPATH_W) 'fenv-softfp.c'; else $(CYGPATH_W) '$(srcdir)/fenv-softfp.c'; fi`<br>
+<br>
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)<br>
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \<br>
unique=`for i in $$list; do \<br>
@@ -427,8 +541,32 @@ GTAGS:<br>
&& $(am__cd) $(top_srcdir) \<br>
&& gtags -i $(GTAGS_ARGS) "$$here"<br>
<br>
+cscope: cscope.files<br>
+ test ! -s cscope.files \<br>
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)<br>
+<br>
+clean-cscope:<br>
+ -rm -f cscope.files<br>
+<br>
+cscope.files: clean-cscope cscopelist<br>
+<br>
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)<br>
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \<br>
+ case "$(srcdir)" in \<br>
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \<br>
+ *) sdir=$(subdir)/$(srcdir) ;; \<br>
+ esac; \<br>
+ for i in $$list; do \<br>
+ if test -f "$$i"; then \<br>
+ echo "$(subdir)/$$i"; \<br>
+ else \<br>
+ echo "$$sdir/$$i"; \<br>
+ fi; \<br>
+ done >> $(top_builddir)/cscope.files<br>
+<br>
distclean-tags:<br>
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags<br>
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files<br>
check-am:<br>
check: check-am<br>
all-am: Makefile $(LIBRARIES) $(DATA)<br>
@@ -537,17 +675,17 @@ uninstall-am:<br>
.MAKE: install-am install-strip<br>
<br>
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \<br>
- clean-generic clean-noinstLIBRARIES ctags distclean \<br>
- distclean-compile distclean-generic distclean-tags dvi dvi-am \<br>
- html html-am info info-am install install-am install-data \<br>
- install-data-am install-dvi install-dvi-am install-exec \<br>
- install-exec-am install-html install-html-am install-info \<br>
- install-info-am install-man install-pdf install-pdf-am \<br>
- install-ps install-ps-am install-strip installcheck \<br>
- installcheck-am installdirs maintainer-clean \<br>
- maintainer-clean-generic mostlyclean mostlyclean-compile \<br>
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \<br>
- uninstall-am<br>
+ clean-cscope clean-generic clean-noinstLIBRARIES cscope \<br>
+ cscopelist ctags distclean distclean-compile distclean-generic \<br>
+ distclean-tags dvi dvi-am html html-am info info-am install \<br>
+ install-am install-data install-data-am install-dvi \<br>
+ install-dvi-am install-exec install-exec-am install-html \<br>
+ install-html-am install-info install-info-am install-man \<br>
+ install-pdf install-pdf-am install-ps install-ps-am \<br>
+ install-strip installcheck installcheck-am installdirs \<br>
+ maintainer-clean maintainer-clean-generic mostlyclean \<br>
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \<br>
+ tags uninstall uninstall-am<br>
<br>
<a href="http://objectlist.awk.in" rel="noreferrer" target="_blank">objectlist.awk.in</a>: $(noinst_LTLIBRARIES)<br>
-rm -f <a href="http://objectlist.awk.in" rel="noreferrer" target="_blank">objectlist.awk.in</a><br>
diff --git a/newlib/libm/machine/arm/fe_dfl_env.c b/newlib/libm/machine/arm/fe_dfl_env.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fe_dfl_env.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/feclearexcept.c b/newlib/libm/machine/arm/feclearexcept.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/feclearexcept.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fegetenv.c b/newlib/libm/machine/arm/fegetenv.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fegetenv.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fegetexceptflag.c b/newlib/libm/machine/arm/fegetexceptflag.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fegetexceptflag.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fegetround.c b/newlib/libm/machine/arm/fegetround.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fegetround.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/feholdexcept.c b/newlib/libm/machine/arm/feholdexcept.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/feholdexcept.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fenv-softfp.c b/newlib/libm/machine/arm/fenv-softfp.c<br>
new file mode 100644<br>
index 000000000..a576cc1b2<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fenv-softfp.c<br>
@@ -0,0 +1,32 @@<br>
+/*-<br>
+ * Copyright (c) 2013 Andrew Turner <andrew@FreeBSD.ORG><br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND<br>
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE<br>
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br>
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<br>
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<br>
+ * SUCH DAMAGE.<br>
+ *<br>
+ * $FreeBSD$<br>
+ */<br>
+<br>
+#define FENV_MANGLE(x) __softfp_ ##x<br>
+#include <machine/fenv-mangle.h><br>
+#include "fenv.c"<br>
+<br>
diff --git a/newlib/libm/machine/arm/fenv-vfp.c b/newlib/libm/machine/arm/fenv-vfp.c<br>
new file mode 100644<br>
index 000000000..297e81296<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fenv-vfp.c<br>
@@ -0,0 +1,32 @@<br>
+/*-<br>
+ * Copyright (c) 2013 Andrew Turner <andrew@FreeBSD.ORG><br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND<br>
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE<br>
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br>
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<br>
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<br>
+ * SUCH DAMAGE.<br>
+ *<br>
+ * $FreeBSD$<br>
+ */<br>
+<br>
+#define FENV_MANGLE(x) __vfp_ ##x<br>
+#include <machine/fenv-mangle.h><br>
+#include "fenv.c"<br>
+<br>
diff --git a/newlib/libm/machine/arm/fenv.c b/newlib/libm/machine/arm/fenv.c<br>
new file mode 100644<br>
index 000000000..278de8633<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fenv.c<br>
@@ -0,0 +1,328 @@<br>
+/*-<br>
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD<br>
+ *<br>
+ * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG><br>
+ * Copyright (c) 2013 Andrew Turner <andrew@FreeBSD.ORG><br>
+ * All rights reserved.<br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND<br>
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE<br>
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL<br>
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY<br>
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF<br>
+ * SUCH DAMAGE.<br>
+ *<br>
+ * $FreeBSD$<br>
+ */<br>
+<br>
+#define __fenv_static<br>
+#include <fenv.h><br>
+<br>
+#include <machine/acle-compat.h><br>
+<br>
+#if __ARM_ARCH >= 6<br>
+#define FENV_ARMv6<br>
+#endif<br>
+<br>
+/* When SOFTFP_ABI is defined we are using the softfp ABI. */<br>
+#if defined(__VFP_FP__) && !defined(__ARM_PCS_VFP)<br>
+#define SOFTFP_ABI<br>
+#endif<br>
+<br>
+<br>
+#ifndef FENV_MANGLE<br>
+/*<br>
+ * Hopefully the system ID byte is immutable, so it's valid to use<br>
+ * this as a default environment.<br>
+ */<br>
+fenv_t __fe_dfl_env = { 0 };<br>
+<br>
+const fenv_t *_fe_dfl_env = &__fe_dfl_env;<br>
+#endif<br>
+<br>
+<br>
+/* If this is a non-mangled softfp version special processing is required */<br>
+#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) || !defined(FENV_ARMv6)<br>
+<br>
+/*<br>
+ * The following macros map between the softfloat emulator's flags and<br>
+ * the hardware's FPSR. The hardware this file was written for doesn't<br>
+ * have rounding control bits, so we stick those in the system ID byte.<br>
+ */<br>
+#ifndef __ARM_PCS_VFP<br>
+#define __set_env(env, flags, mask, rnd) env = ((flags) \<br>
+ | (mask)<<_FPUSW_SHIFT \<br>
+ | (rnd) << 24)<br>
+#define __env_flags(env) ((env) & FE_ALL_EXCEPT)<br>
+#define __env_mask(env) (((env) >> _FPUSW_SHIFT) \<br>
+ & FE_ALL_EXCEPT)<br>
+#define __env_round(env) (((env) >> 24) & _ROUND_MASK)<br>
+<br>
+#include <machine/fenv-softfloat.h><br>
+<br>
+#else /* __ARM_PCS_VFP PRESENT */<br>
+<br>
+#include <machine/fenv-vfp.h><br>
+<br>
+#endif /* __ARM_PCS_VFP */<br>
+<br>
+#ifdef __GNUC_GNU_INLINE__<br>
+#error "This file must be compiled with C99 'inline' semantics"<br>
+#endif<br>
+<br>
+extern inline int feclearexcept(int excepts);<br>
+extern inline int fegetexceptflag(fexcept_t *flagp, int excepts);<br>
+extern inline int fesetexceptflag(const fexcept_t *flagp, int excepts);<br>
+extern inline int feraiseexcept(int excepts);<br>
+extern inline int fetestexcept(int excepts);<br>
+extern inline int fegetround(void);<br>
+extern inline int fesetround(int round);<br>
+extern inline int fegetenv(fenv_t *envp);<br>
+extern inline int feholdexcept(fenv_t *envp);<br>
+extern inline int fesetenv(const fenv_t *envp);<br>
+extern inline int feupdateenv(const fenv_t *envp);<br>
+extern inline int feenableexcept(int __mask);<br>
+extern inline int fedisableexcept(int __mask);<br>
+extern inline int fegetexcept(void);<br>
+<br>
+#else /* !FENV_MANGLE && SOFTFP_ABI */<br>
+/* Set by libc when the VFP unit is enabled */<br>
+<br>
+extern int _libc_arm_fpu_present;<br>
+<br>
+int __softfp_feclearexcept(int excepts);<br>
+int __softfp_fegetexceptflag(fexcept_t *flagp, int excepts);<br>
+int __softfp_fesetexceptflag(const fexcept_t *flagp, int excepts);<br>
+int __softfp_feraiseexcept(int excepts);<br>
+int __softfp_fetestexcept(int excepts);<br>
+int __softfp_fegetround(void);<br>
+int __softfp_fesetround(int round);<br>
+int __softfp_fegetenv(fenv_t *envp);<br>
+int __softfp_feholdexcept(fenv_t *envp);<br>
+int __softfp_fesetenv(const fenv_t *envp);<br>
+int __softfp_feupdateenv(const fenv_t *envp);<br>
+int __softfp_feenableexcept(int __mask);<br>
+int __softfp_fedisableexcept(int __mask);<br>
+int __softfp_fegetexcept(void);<br>
+<br>
+int __vfp_feclearexcept(int excepts);<br>
+int __vfp_fegetexceptflag(fexcept_t *flagp, int excepts);<br>
+int __vfp_fesetexceptflag(const fexcept_t *flagp, int excepts);<br>
+int __vfp_feraiseexcept(int excepts);<br>
+int __vfp_fetestexcept(int excepts);<br>
+int __vfp_fegetround(void);<br>
+int __vfp_fesetround(int round);<br>
+int __vfp_fegetenv(fenv_t *envp);<br>
+int __vfp_feholdexcept(fenv_t *envp);<br>
+int __vfp_fesetenv(const fenv_t *envp);<br>
+int __vfp_feupdateenv(const fenv_t *envp);<br>
+int __vfp_feenableexcept(int __mask);<br>
+int __vfp_fedisableexcept(int __mask);<br>
+int __vfp_fegetexcept(void);<br>
+<br>
+static int<br>
+__softfp_round_to_vfp(int round)<br>
+{<br>
+<br>
+ switch (round) {<br>
+ case FE_TONEAREST:<br>
+ default:<br>
+ return VFP_FE_TONEAREST;<br>
+ case FE_TOWARDZERO:<br>
+ return VFP_FE_TOWARDZERO;<br>
+ case FE_UPWARD:<br>
+ return VFP_FE_UPWARD;<br>
+ case FE_DOWNWARD:<br>
+ return VFP_FE_DOWNWARD;<br>
+ }<br>
+}<br>
+<br>
+static int<br>
+__softfp_round_from_vfp(int round)<br>
+{<br>
+<br>
+ switch (round) {<br>
+ case VFP_FE_TONEAREST:<br>
+ default:<br>
+ return FE_TONEAREST;<br>
+ case VFP_FE_TOWARDZERO:<br>
+ return FE_TOWARDZERO;<br>
+ case VFP_FE_UPWARD:<br>
+ return FE_UPWARD;<br>
+ case VFP_FE_DOWNWARD:<br>
+ return FE_DOWNWARD;<br>
+ }<br>
+}<br>
+<br>
+int feclearexcept(int excepts)<br>
+{<br>
+<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_feclearexcept(excepts);<br>
+ __softfp_feclearexcept(excepts);<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int fegetexceptflag(fexcept_t *flagp, int excepts)<br>
+{<br>
+ fexcept_t __vfp_flagp;<br>
+<br>
+ __vfp_flagp = 0;<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_fegetexceptflag(&__vfp_flagp, excepts);<br>
+ __softfp_fegetexceptflag(flagp, excepts);<br>
+<br>
+ *flagp |= __vfp_flagp;<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int fesetexceptflag(const fexcept_t *flagp, int excepts)<br>
+{<br>
+<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_fesetexceptflag(flagp, excepts);<br>
+ __softfp_fesetexceptflag(flagp, excepts);<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int feraiseexcept(int excepts)<br>
+{<br>
+<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_feraiseexcept(excepts);<br>
+ __softfp_feraiseexcept(excepts);<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int fetestexcept(int excepts)<br>
+{<br>
+ int __got_excepts;<br>
+<br>
+ __got_excepts = 0;<br>
+ if (_libc_arm_fpu_present)<br>
+ __got_excepts = __vfp_fetestexcept(excepts);<br>
+ __got_excepts |= __softfp_fetestexcept(excepts);<br>
+<br>
+ return (__got_excepts);<br>
+}<br>
+<br>
+int fegetround(void)<br>
+{<br>
+<br>
+ if (_libc_arm_fpu_present)<br>
+ return __softfp_round_from_vfp(__vfp_fegetround());<br>
+ return __softfp_fegetround();<br>
+}<br>
+<br>
+int fesetround(int round)<br>
+{<br>
+<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_fesetround(__softfp_round_to_vfp(round));<br>
+ __softfp_fesetround(round);<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int fegetenv(fenv_t *envp)<br>
+{<br>
+ fenv_t __vfp_envp;<br>
+<br>
+ __vfp_envp = 0;<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_fegetenv(&__vfp_envp);<br>
+ __softfp_fegetenv(envp);<br>
+ *envp |= __vfp_envp;<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int feholdexcept(fenv_t *envp)<br>
+{<br>
+ fenv_t __vfp_envp;<br>
+<br>
+ __vfp_envp = 0;<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_feholdexcept(&__vfp_envp);<br>
+ __softfp_feholdexcept(envp);<br>
+ *envp |= __vfp_envp;<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int fesetenv(const fenv_t *envp)<br>
+{<br>
+<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_fesetenv(envp);<br>
+ __softfp_fesetenv(envp);<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int feupdateenv(const fenv_t *envp)<br>
+{<br>
+<br>
+ if (_libc_arm_fpu_present)<br>
+ __vfp_feupdateenv(envp);<br>
+ __softfp_feupdateenv(envp);<br>
+<br>
+ return (0);<br>
+}<br>
+<br>
+int feenableexcept(int __mask)<br>
+{<br>
+ int __unmasked;<br>
+<br>
+ __unmasked = 0;<br>
+ if (_libc_arm_fpu_present)<br>
+ __unmasked = __vfp_feenableexcept(__mask);<br>
+ __unmasked |= __softfp_feenableexcept(__mask);<br>
+<br>
+ return (__unmasked);<br>
+}<br>
+<br>
+int fedisableexcept(int __mask)<br>
+{<br>
+ int __unmasked;<br>
+<br>
+ __unmasked = 0;<br>
+ if (_libc_arm_fpu_present)<br>
+ __unmasked = __vfp_fedisableexcept(__mask);<br>
+ __unmasked |= __softfp_fedisableexcept(__mask);<br>
+<br>
+ return (__unmasked);<br>
+}<br>
+<br>
+int fegetexcept(void)<br>
+{<br>
+ int __unmasked;<br>
+<br>
+ __unmasked = 0;<br>
+ if (_libc_arm_fpu_present)<br>
+ __unmasked = __vfp_fegetexcept();<br>
+ __unmasked |= __softfp_fegetexcept();<br>
+<br>
+ return (__unmasked);<br>
+}<br>
+<br>
+#endif<br>
+<br>
diff --git a/newlib/libm/machine/arm/feraiseexcept.c b/newlib/libm/machine/arm/feraiseexcept.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/feraiseexcept.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fesetenv.c b/newlib/libm/machine/arm/fesetenv.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fesetenv.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fesetexceptflag.c b/newlib/libm/machine/arm/fesetexceptflag.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fesetexceptflag.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fesetround.c b/newlib/libm/machine/arm/fesetround.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fesetround.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/fetestexcept.c b/newlib/libm/machine/arm/fetestexcept.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/fetestexcept.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
diff --git a/newlib/libm/machine/arm/feupdateenv.c b/newlib/libm/machine/arm/feupdateenv.c<br>
new file mode 100644<br>
index 000000000..8cbee7771<br>
--- /dev/null<br>
+++ b/newlib/libm/machine/arm/feupdateenv.c<br>
@@ -0,0 +1,7 @@<br>
+/*<br>
+ * SPDX-License-Identifier: BSD-2-Clause<br>
+ *<br>
+ * (c) Copyright 2019 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
+ */<br>
+<br>
+#include "../../fenv/fenv_stub.c"<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>