diff options
Diffstat (limited to 'sysdeps/m68k/coldfire/fpu')
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/bits/mathinline.h | 44 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/e_sqrt.c | 24 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/e_sqrtf.c | 25 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/fraiseexcpt.c | 68 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/libm-test-ulps | 228 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/libm-test-ulps-name | 1 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/math_private.h | 10 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_fabs.c | 28 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_fabsf.c | 24 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_lrint.c | 29 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_lrintf.c | 25 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_rint.c | 28 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_rintf.c | 25 |
13 files changed, 0 insertions, 559 deletions
diff --git a/sysdeps/m68k/coldfire/fpu/bits/mathinline.h b/sysdeps/m68k/coldfire/fpu/bits/mathinline.h deleted file mode 100644 index 7dbfe37ee1..0000000000 --- a/sysdeps/m68k/coldfire/fpu/bits/mathinline.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Inline math functions for Coldfire. - Copyright (C) 2012-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _MATH_H -# error "Never use <bits/mathinline.h> directly; include <math.h> instead." -#endif - -#ifndef __extern_always_inline -# define __MATH_INLINE __inline -#else -# define __MATH_INLINE __extern_always_inline -#endif - -#if defined __USE_ISOC99 && defined __GNUC__ - -/* Test for negative number. Used in the signbit macro. */ -__MATH_INLINE int -__NTH (__signbitf (float __x)) -{ - return __builtin_signbitf (__x); -} - -__MATH_INLINE int -__NTH (__signbit (double __x)) -{ - return __builtin_signbit (__x); -} - -#endif diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/sysdeps/m68k/coldfire/fpu/e_sqrt.c deleted file mode 100644 index 6e54475f88..0000000000 --- a/sysdeps/m68k/coldfire/fpu/e_sqrt.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -double -__ieee754_sqrt (double x) -{ - asm ("fdsqrt.d %1,%0" : "=f" (x) : "fm" (x)); - return x; -} -strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c deleted file mode 100644 index 64d26f87a7..0000000000 --- a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -float -__ieee754_sqrtf (float x) -{ - double result; - asm ("fssqrt.s %1,%0" : "=f" (result) : "dm" (x)); - return result; -} -strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c deleted file mode 100644 index 4220a6b877..0000000000 --- a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Raise given exceptions. - Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#include <fenv.h> -#include <float.h> -#include <math.h> - -int -__feraiseexcept (int excepts) -{ - /* Raise exceptions represented by EXCEPTS. But we must raise only one - signal at a time. It is important that if the overflow/underflow - exception and the divide by zero exception are given at the same - time, the overflow/underflow exception follows the divide by zero - exception. - - The Coldfire FPU allows an exception to be raised by asserting - the associated EXC bit and then executing an arbitrary arithmetic - instruction. fmove.l is classified as an arithmetic instruction - and suffices for this purpose. - - We therefore raise an exception by setting both the EXC and AEXC - bit associated with the exception (the former being 6 bits to the - left of the latter) and then loading the longword at (%sp) into an - FP register. */ - - inline void - raise_one_exception (int mask) - { - if (excepts & mask) - { - int fpsr; - double unused; - - asm volatile ("fmove%.l %/fpsr,%0" : "=d" (fpsr)); - fpsr |= (mask << 6) | mask; - asm volatile ("fmove%.l %0,%/fpsr" :: "d" (fpsr)); - asm volatile ("fmove%.l (%%sp),%0" : "=f" (unused)); - } - } - - raise_one_exception (FE_INVALID); - raise_one_exception (FE_DIVBYZERO); - raise_one_exception (FE_OVERFLOW); - raise_one_exception (FE_UNDERFLOW); - raise_one_exception (FE_INEXACT); - - /* Success. */ - return 0; -} -libm_hidden_def (__feraiseexcept) -weak_alias (__feraiseexcept, feraiseexcept) -libm_hidden_weak (feraiseexcept) diff --git a/sysdeps/m68k/coldfire/fpu/libm-test-ulps b/sysdeps/m68k/coldfire/fpu/libm-test-ulps deleted file mode 100644 index fad7f8f068..0000000000 --- a/sysdeps/m68k/coldfire/fpu/libm-test-ulps +++ /dev/null @@ -1,228 +0,0 @@ -# Begin of automatic generation - -# Maximal error of functions: -Function: "atan2": -float: 1 -ifloat: 1 - -Function: "atanh": -float: 1 -ifloat: 1 - -Function: Imaginary part of "cacosh": -float: 1 -ifloat: 1 - -Function: Real part of "casin": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "casinh": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 - -Function: Imaginary part of "casinh": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 - -Function: Imaginary part of "catan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "catanh": -double: 4 -idouble: 4 - -Function: "cbrt": -double: 1 -idouble: 1 - -Function: Real part of "ccos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "ccos": -float: 1 -ifloat: 1 - -Function: Real part of "ccosh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "ccosh": -float: 1 -ifloat: 1 - -Function: Real part of "cexp": -float: 1 -ifloat: 1 - -Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 - -Function: Real part of "clog": -float: 1 -ifloat: 1 - -Function: Real part of "clog10": -float: 1 -ifloat: 1 - -Function: Imaginary part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "cos": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -Function: Real part of "cpow": -double: 2 -float: 4 -idouble: 2 -ifloat: 4 - -Function: Imaginary part of "cpow": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 - -Function: Real part of "csinh": -float: 1 -ifloat: 1 - -Function: Imaginary part of "csinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "csqrt": -float: 1 -ifloat: 1 - -Function: Imaginary part of "ctan": -double: 1 -idouble: 1 - -Function: Real part of "ctanh": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 - -Function: "erf": -double: 1 -idouble: 1 - -Function: "erfc": -double: 1 -idouble: 1 - -Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 - -Function: "expm1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "hypot": -float: 1 -ifloat: 1 - -Function: "j0": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 - -Function: "j1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "jn": -double: 4 -float: 4 -idouble: 4 -ifloat: 4 - -Function: "lgamma": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "log10": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "log1p": -float: 1 -ifloat: 1 - -Function: "sincos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "tan": -double: 1 -idouble: 1 - -Function: "tgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "y0": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -Function: "y1": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 - -Function: "yn": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 - -# end of automatic generation diff --git a/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name b/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name deleted file mode 100644 index d0b67ea9eb..0000000000 --- a/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name +++ /dev/null @@ -1 +0,0 @@ -ColdFire diff --git a/sysdeps/m68k/coldfire/fpu/math_private.h b/sysdeps/m68k/coldfire/fpu/math_private.h deleted file mode 100644 index d306a508b4..0000000000 --- a/sysdeps/m68k/coldfire/fpu/math_private.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef COLDFIRE_MATH_PRIVATE_H -#define COLDFIRE_MATH_PRIVATE_H 1 - -/* Enable __finitel, __isinfl, and __isnanl for binary compatibility - when built without long double support. */ -#define LDBL_CLASSIFY_COMPAT 1 - -#include_next <math_private.h> - -#endif diff --git a/sysdeps/m68k/coldfire/fpu/s_fabs.c b/sysdeps/m68k/coldfire/fpu/s_fabs.c deleted file mode 100644 index 6c1a8dc344..0000000000 --- a/sysdeps/m68k/coldfire/fpu/s_fabs.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -double -__fabs (double x) -{ - asm ("fdabs.d %1,%0" : "=f" (x) : "fm" (x)); - return x; -} -weak_alias (__fabs, fabs) -#ifdef NO_LONG_DOUBLE -strong_alias (__fabs, __fabsl) -weak_alias (__fabs, fabsl) -#endif diff --git a/sysdeps/m68k/coldfire/fpu/s_fabsf.c b/sysdeps/m68k/coldfire/fpu/s_fabsf.c deleted file mode 100644 index e134c102e9..0000000000 --- a/sysdeps/m68k/coldfire/fpu/s_fabsf.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -float -__fabsf (float x) -{ - asm ("fsabs.s %1,%0" : "=f" (x) : "dm" (x)); - return x; -} -weak_alias (__fabsf, fabsf) diff --git a/sysdeps/m68k/coldfire/fpu/s_lrint.c b/sysdeps/m68k/coldfire/fpu/s_lrint.c deleted file mode 100644 index 0cdad325d1..0000000000 --- a/sysdeps/m68k/coldfire/fpu/s_lrint.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -long int -__lrint (double x) -{ - long int result; - asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x)); - return result; -} -weak_alias (__lrint, lrint) -#ifdef NO_LONG_DOUBLE -strong_alias (__lrint, __lrintl) -weak_alias (__lrint, lrintl) -#endif diff --git a/sysdeps/m68k/coldfire/fpu/s_lrintf.c b/sysdeps/m68k/coldfire/fpu/s_lrintf.c deleted file mode 100644 index 7f5c9d04f2..0000000000 --- a/sysdeps/m68k/coldfire/fpu/s_lrintf.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -long int -__lrintf (float x) -{ - long int result; - asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x)); - return result; -} -weak_alias (__lrintf, lrintf) diff --git a/sysdeps/m68k/coldfire/fpu/s_rint.c b/sysdeps/m68k/coldfire/fpu/s_rint.c deleted file mode 100644 index e950630688..0000000000 --- a/sysdeps/m68k/coldfire/fpu/s_rint.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -double -__rint (double x) -{ - asm ("fint.d %1,%0" : "=f" (x) : "fm" (x)); - return x; -} -weak_alias (__rint, rint) -#ifdef NO_LONG_DOUBLE -strong_alias (__rint, __rintl) -weak_alias (__rint, rintl) -#endif diff --git a/sysdeps/m68k/coldfire/fpu/s_rintf.c b/sysdeps/m68k/coldfire/fpu/s_rintf.c deleted file mode 100644 index ea244e8b88..0000000000 --- a/sysdeps/m68k/coldfire/fpu/s_rintf.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -float -__rintf (float x) -{ - double result; - asm ("fint.s %1,%0" : "=f" (result) : "dm" (x)); - return (float) result; -} -weak_alias (__rintf, rintf) |