diff options
author | Roland McGrath <roland@gnu.org> | 2008-11-26 07:26:32 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2008-11-26 07:26:32 +0000 |
commit | c0439b95b88bccacb5562e372f881beb23376a72 (patch) | |
tree | aea008f060bef693d43f285f5adb5ece05cb7db6 /sysdeps/alpha/fpu | |
parent | f1092afe15ad779d61a1420c05854a9122d3ce5e (diff) | |
download | glibc-c0439b95b88bccacb5562e372f881beb23376a72.tar.gz |
Moved alpha to ports repository.
2008-11-25 Roland McGrath <roland@redhat.com>
* sysdeps/alpha, sysdeps/unix/bsd/osf/alpha,
sysdeps/unix/bsd/Attic/osf1/alpha, sysdeps/unix/sysv/linux/alpha,
sysdeps/unix/sysv/linux/alpha/alpha, sysdeps/unix/alpha,
sysdeps/mach/alpha, sysdeps/mach/hurd/alpha:
Subdirectories moved to ports repository.
* configure.in (base_machine): Remove alpha case.
Diffstat (limited to 'sysdeps/alpha/fpu')
74 files changed, 0 insertions, 4649 deletions
diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions deleted file mode 100644 index c9b0e03a91..0000000000 --- a/sysdeps/alpha/fpu/Versions +++ /dev/null @@ -1,23 +0,0 @@ -libc { - GLIBC_2.0 { - # functions used in other libraries - __ieee_get_fp_control; __ieee_set_fp_control; - } -} -libm { - GLIBC_2.3.4 { - # functions implementing old complex float abi - __c1_cabsf; __c1_cacosf; __c1_cacoshf; __c1_cargf; __c1_casinf; - __c1_casinhf; __c1_catanf; __c1_catanhf; __c1_ccosf; __c1_ccoshf; - __c1_cexpf; __c1_cimagf; __c1_clog10f; __c1_clogf; __c1_conjf; - __c1_cpowf; __c1_cprojf; __c1_crealf; __c1_csinf; __c1_csinhf; - __c1_csqrtf; __c1_ctanf; __c1_ctanhf; - - # functions implementing new complex float abi - cabsf; cacosf; cacoshf; cargf; casinf; - casinhf; catanf; catanhf; ccosf; ccoshf; - cexpf; cimagf; clog10f; clogf; conjf; - cpowf; cprojf; crealf; csinf; csinhf; - csqrtf; ctanf; ctanhf; - } -} diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h deleted file mode 100644 index a9e89b498e..0000000000 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FENV_H -# error "Never use <bits/fenv.h> directly; include <fenv.h> instead." -#endif - - -/* Define the bits representing the exception. - - Note that these are the bit positions as defined by the OSF/1 - ieee_{get,set}_control_word interface and not by the hardware fpcr. - - See the Alpha Architecture Handbook section 4.7.7.3 for details, - but in summary, trap shadows mean the hardware register can acquire - extra exception bits so for proper IEEE support the tracking has to - be done in software -- in this case with kernel support. - - As to why the system call interface isn't in the same format as - the hardware register, only those crazy folks at DEC can tell you. */ - -enum - { -#ifdef __USE_GNU - FE_DENORMAL = 1UL << 22, -#define FE_DENORMAL FE_DENORMAL -#endif - - FE_INEXACT = 1UL << 21, -#define FE_INEXACT FE_INEXACT - - FE_UNDERFLOW = 1UL << 20, -#define FE_UNDERFLOW FE_UNDERFLOW - - FE_OVERFLOW = 1UL << 19, -#define FE_OVERFLOW FE_OVERFLOW - - FE_DIVBYZERO = 1UL << 18, -#define FE_DIVBYZERO FE_DIVBYZERO - - FE_INVALID = 1UL << 17, -#define FE_INVALID FE_INVALID - - FE_ALL_EXCEPT = 0x3f << 17 -#define FE_ALL_EXCEPT FE_ALL_EXCEPT - }; - -/* Alpha chips support all four defined rouding modes. - - Note that code must be compiled to use dynamic rounding (/d) instructions - to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc - this is -fprm d. The default for both is static rounding to nearest. - - These are shifted down 58 bits from the hardware fpcr because the - functions are declared to take integers. */ - -enum - { - FE_TOWARDZERO = 0, -#define FE_TOWARDZERO FE_TOWARDZERO - - FE_DOWNWARD = 1, -#define FE_DOWNWARD FE_DOWNWARD - - FE_TONEAREST = 2, -#define FE_TONEAREST FE_TONEAREST - - FE_UPWARD = 3, -#define FE_UPWARD FE_UPWARD - }; - -#ifdef __USE_GNU -/* On later hardware, and later kernels for earlier hardware, we can forcibly - underflow denormal inputs and outputs. This can speed up certain programs - significantly, usually without affecting accuracy. */ -enum - { - FE_MAP_DMZ = 1UL << 12, /* Map denorm inputs to zero */ -#define FE_MAP_DMZ FE_MAP_DMZ - - FE_MAP_UMZ = 1UL << 13, /* Map underflowed outputs to zero */ -#define FE_MAP_UMZ FE_MAP_UMZ - }; -#endif - -/* Type representing exception flags. */ -typedef unsigned long int fexcept_t; - -/* Type representing floating-point environment. */ -typedef unsigned long int fenv_t; - -/* If the default argument is used we use this value. Note that due to - architecture-specified page mappings, no user-space pointer will ever - have its two high bits set. Co-opt one. */ -#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL) - -#ifdef __USE_GNU -/* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL) - -/* Floating-point environment with (processor-dependent) non-IEEE floating - point. In this case, mapping denormals to zero. */ -# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL) -#endif - -/* The system calls to talk to the kernel's FP code. */ -extern unsigned long int __ieee_get_fp_control (void) __THROW; -extern void __ieee_set_fp_control (unsigned long int __value) __THROW; diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h deleted file mode 100644 index 5378a181c6..0000000000 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ /dev/null @@ -1,150 +0,0 @@ -/* Inline math functions for Alpha. - Copyright (C) 1996, 1997, 1999-2001, 2004, 2007 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger-Tang. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _MATH_H -# error "Never use <bits/mathinline.h> directly; include <math.h> instead." -#endif - -#ifndef __extern_inline -# define __MATH_INLINE __inline -#else -# define __MATH_INLINE __extern_inline -#endif - -#if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0) -# undef isgreater -# undef isgreaterequal -# undef isless -# undef islessequal -# undef islessgreater -# undef isunordered -# define isunordered(u, v) \ - (__extension__ \ - ({ double __r, __u = (u), __v = (v); \ - __asm ("cmptun/su %1,%2,%0\n\ttrapb" \ - : "=&f" (__r) : "f" (__u), "f"(__v)); \ - __r != 0; })) -#endif /* ISO C99 */ - -#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ - && defined __OPTIMIZE__ - -#if !__GNUC_PREREQ (4, 0) -# define __inline_copysign(NAME, TYPE) \ -__MATH_INLINE TYPE \ -__NTH (NAME (TYPE __x, TYPE __y)) \ -{ \ - TYPE __z; \ - __asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \ - return __z; \ -} - -__inline_copysign (__copysignf, float) -__inline_copysign (copysignf, float) -__inline_copysign (__copysign, double) -__inline_copysign (copysign, double) - -# undef __inline_copysign -#endif - - -#if !__GNUC_PREREQ (2, 8) -# define __inline_fabs(NAME, TYPE) \ -__MATH_INLINE TYPE \ -__NTH (NAME (TYPE __x)) \ -{ \ - TYPE __z; \ - __asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \ - return __z; \ -} - -__inline_fabs (__fabsf, float) -__inline_fabs (fabsf, float) -__inline_fabs (__fabs, double) -__inline_fabs (fabs, double) - -# undef __inline_fabs -#endif - -#ifdef __USE_ISOC99 - -/* Test for negative number. Used in the signbit() macro. */ -__MATH_INLINE int -__NTH (__signbitf (float __x)) -{ -#if !__GNUC_PREREQ (4, 0) - __extension__ union { float __f; int __i; } __u = { __f: __x }; - return __u.__i < 0; -#else - return __builtin_signbitf (__x); -#endif -} - -__MATH_INLINE int -__NTH (__signbit (double __x)) -{ -#if !__GNUC_PREREQ (4, 0) - __extension__ union { double __d; long __i; } __u = { __d: __x }; - return __u.__i < 0; -#else - return __builtin_signbit (__x); -#endif -} - -__MATH_INLINE int -__NTH (__signbitl (long double __x)) -{ -#if !__GNUC_PREREQ (4, 0) - __extension__ union { - long double __d; - long __i[sizeof(long double)/sizeof(long)]; - } __u = { __d: __x }; - return __u.__i[sizeof(long double)/sizeof(long) - 1] < 0; -#else - return __builtin_signbitl (__x); -#endif -} - -/* Test for NaN. Used in the isnan() macro. */ - -__MATH_INLINE int -__NTH (__isnanf (float __x)) -{ - return isunordered (__x, __x); -} - -__MATH_INLINE int -__NTH (__isnan (double __x)) -{ - return isunordered (__x, __x); -} - -#ifndef __NO_LONG_DOUBLE_MATH -__MATH_INLINE int -__NTH (__isnanl (long double __x)) -{ - return isunordered (__x, __x); -} -#endif - -#endif /* C99 */ - -#endif /* __NO_MATH_INLINES */ diff --git a/sysdeps/alpha/fpu/cabsf.c b/sysdeps/alpha/fpu/cabsf.c deleted file mode 100644 index de8e6b5548..0000000000 --- a/sysdeps/alpha/fpu/cabsf.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Return the complex absolute value of float complex value. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cabsf __cabsf_not_defined -#define cabsf cabsf_not_defined - -#include <complex.h> -#include <math.h> -#include "cfloat-compat.h" - -#undef __cabsf -#undef cabsf - -float -__c1_cabsf (c1_cfloat_decl (z)) -{ - return __hypotf (c1_cfloat_real (z), c1_cfloat_imag (z)); -} - -float -__c2_cabsf (c2_cfloat_decl (z)) -{ - return __hypotf (c2_cfloat_real (z), c2_cfloat_imag (z)); -} - -cfloat_versions (cabsf); diff --git a/sysdeps/alpha/fpu/cargf.c b/sysdeps/alpha/fpu/cargf.c deleted file mode 100644 index 1d96e5897d..0000000000 --- a/sysdeps/alpha/fpu/cargf.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Compute argument of complex float value. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cargf __cargf_not_defined -#define cargf cargf_not_defined - -#include <complex.h> -#include <math.h> -#include "cfloat-compat.h" - -#undef __cargf -#undef cargf - -float -__c1_cargf (c1_cfloat_decl (x)) -{ - return __atan2f (c1_cfloat_imag (x), c1_cfloat_real (x)); -} - -float -__c2_cargf (c2_cfloat_decl (x)) -{ - return __atan2f (c2_cfloat_imag (x), c2_cfloat_real (x)); -} - -cfloat_versions (cargf); diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h deleted file mode 100644 index d325a7650e..0000000000 --- a/sysdeps/alpha/fpu/cfloat-compat.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Compatibility macros for old and new Alpha complex float ABI. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* The behaviour of complex float changed between GCC 3.3 and 3.4. - - In 3.3 and before (below, complex version 1, or "c1"), complex float - values were packed into one floating point register. - - In 3.4 and later (below, complex version 2, or "c2"), GCC changed to - follow the official Tru64 ABI, which passes the components of a complex - as separate parameters. */ - -#if __GNUC_PREREQ(3,4) - typedef union { double d; _Complex float cf; } c1_compat; -# define c1_cfloat_decl(x) double x -# define c1_cfloat_real(x) __real__ c1_cfloat_value (x) -# define c1_cfloat_imag(x) __imag__ c1_cfloat_value (x) -# define c1_cfloat_value(x) (((c1_compat *)(void *)&x)->cf) -# define c1_cfloat_rettype double -# define c1_cfloat_return(x) ({ c1_compat _; _.cf = (x); _.d; }) -# define c2_cfloat_decl(x) _Complex float x -# define c2_cfloat_real(x) __real__ x -# define c2_cfloat_imag(x) __imag__ x -# define c2_cfloat_value(x) x -# define c2_cfloat_rettype _Complex float -# define c2_cfloat_return(x) x -#else -# define c1_cfloat_decl(x) _Complex float x -# define c1_cfloat_real(x) __real__ x -# define c1_cfloat_imag(x) __imag__ x -# define c1_cfloat_value(x) x -# define c1_cfloat_rettype _Complex float -# define c1_cfloat_return(x) x -# define c2_cfloat_decl(x) float x ## r, float x ## i -# define c2_cfloat_real(x) x ## r -# define c2_cfloat_imag(x) x ## i -# define c2_cfloat_value(x) \ - ({ _Complex float _; __real__ _ = x##r; __imag__ _ = x##i; _; }) -# define c2_cfloat_rettype double _Complex -# define c2_cfloat_return(x) x -#endif - -/* Get the proper symbol versions defined for each function. */ - -#include <shlib-compat.h> - -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_4) -#define cfloat_versions_compat(func) \ - compat_symbol (libm, __c1_##func, func, GLIBC_2_1) -#else -#define cfloat_versions_compat(func) -#endif - -#define cfloat_versions(func) \ - cfloat_versions_compat(func); \ - versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_4); \ - extern typeof(__c2_##func) __##func attribute_hidden; \ - strong_alias (__c2_##func, __##func) diff --git a/sysdeps/alpha/fpu/cimagf.c b/sysdeps/alpha/fpu/cimagf.c deleted file mode 100644 index a9b351f188..0000000000 --- a/sysdeps/alpha/fpu/cimagf.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Return imaginary part of complex float value. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cimagf __cimagf_not_defined -#define cimagf cimagf_not_defined - -#include <complex.h> -#include "cfloat-compat.h" - -#undef __cimagf -#undef cimagf - -float -__c1_cimagf (c1_cfloat_decl (z)) -{ - return c1_cfloat_imag (z); -} - -float -__c2_cimagf (c2_cfloat_decl (z)) -{ - return c2_cfloat_imag (z); -} - -cfloat_versions (cimagf); diff --git a/sysdeps/alpha/fpu/conjf.c b/sysdeps/alpha/fpu/conjf.c deleted file mode 100644 index 6ff92b9948..0000000000 --- a/sysdeps/alpha/fpu/conjf.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Return complex conjugate of complex float value. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __conjf __conjf_not_defined -#define conjf conjf_not_defined - -#include <complex.h> -#include "cfloat-compat.h" - -#undef __conjf -#undef conjf - -c1_cfloat_rettype -__c1_conjf (c1_cfloat_decl (z)) -{ - _Complex float r = ~ c1_cfloat_value (z); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_conjf (c2_cfloat_decl (z)) -{ - _Complex float r = ~ c2_cfloat_value (z); - return c2_cfloat_return (r); -} - -cfloat_versions (conjf); diff --git a/sysdeps/alpha/fpu/crealf.c b/sysdeps/alpha/fpu/crealf.c deleted file mode 100644 index 52ab271738..0000000000 --- a/sysdeps/alpha/fpu/crealf.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Return real part of complex float value. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __crealf __crealf_not_defined -#define crealf crealf_not_defined - -#include <complex.h> -#include "cfloat-compat.h" - -#undef __crealf -#undef crealf - -float -__c1_crealf (c1_cfloat_decl (z)) -{ - return c1_cfloat_real (z); -} - -float -__c2_crealf (c2_cfloat_decl (z)) -{ - return c2_cfloat_real (z); -} - -cfloat_versions (crealf); diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c deleted file mode 100644 index c5ab25f16f..0000000000 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright (C) 1996,1997,1998,2002,2003 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@cs.arizona.edu). - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <features.h> - -#if !defined(_IEEE_FP_INEXACT) - -/* - * This version is much faster than generic sqrt implementation, but - * it doesn't handle the inexact flag. It doesn't handle exceptional - * values either, but will defer to the full ieee754_sqrt routine which - * can. - */ - -/* Careful with rearranging this without consulting the assembly below. */ -const static struct sqrt_data_struct { - unsigned long dn, up, half, almost_three_half; - unsigned long one_and_a_half, two_to_minus_30, one, nan; - const int T2[64]; -} sqrt_data __attribute__((used)) = { - 0x3fefffffffffffff, /* __dn = nextafter(1,-Inf) */ - 0x3ff0000000000001, /* __up = nextafter(1,+Inf) */ - 0x3fe0000000000000, /* half */ - 0x3ff7ffffffc00000, /* almost_three_half = 1.5-2^-30 */ - 0x3ff8000000000000, /* one_and_a_half */ - 0x3e10000000000000, /* two_to_minus_30 */ - 0x3ff0000000000000, /* one */ - 0xffffffffffffffff, /* nan */ - - { 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866, - 0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f, - 0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d, - 0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0, - 0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989, - 0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd, - 0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e, - 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd } -}; - -asm ("\ - /* Define offsets into the structure defined in C above. */ \n\ - $DN = 0*8 \n\ - $UP = 1*8 \n\ - $HALF = 2*8 \n\ - $ALMOST_THREE_HALF = 3*8 \n\ - $NAN = 7*8 \n\ - $T2 = 8*8 \n\ - \n\ - /* Stack variables. */ \n\ - $K = 0 \n\ - $Y = 8 \n\ - \n\ - .text \n\ - .align 5 \n\ - .globl __ieee754_sqrt \n\ - .ent __ieee754_sqrt \n\ -__ieee754_sqrt: \n\ - ldgp $29, 0($27) \n\ - subq $sp, 16, $sp \n\ - .frame $sp, 16, $26, 0\n" -#ifdef PROF -" lda $28, _mcount \n\ - jsr $28, ($28), _mcount\n" -#endif -" .prologue 1 \n\ - \n\ - .align 4 \n\ - stt $f16, $K($sp) # e0 : \n\ - mult $f31, $f31, $f31 # .. fm : \n\ - lda $4, sqrt_data # e0 : \n\ - fblt $f16, $fixup # .. fa : \n\ - \n\ - ldah $2, 0x5fe8 # e0 : \n\ - ldq $3, $K($sp) # .. e1 : \n\ - ldt $f12, $HALF($4) # e0 : \n\ - ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : \n\ - \n\ - sll $3, 52, $5 # e0 : \n\ - lda $6, 0x7fd # .. e1 : \n\ - fnop # .. fa : \n\ - fnop # .. fm : \n\ - \n\ - subq $5, 1, $5 # e1 : \n\ - srl $3, 33, $1 # .. e0 : \n\ - cmpule $5, $6, $5 # e0 : \n\ - beq $5, $fixup # .. e1 : \n\ - \n\ - mult $f16, $f12, $f11 # fm : $f11 = x * 0.5 \n\ - subl $2, $1, $2 # .. e0 : \n\ - addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 \n\ - srl $2, 12, $1 # e0 : \n\ - \n\ - and $1, 0xfc, $1 # e0 : \n\ - addq $1, $4, $1 # e1 : \n\ - ldl $1, $T2($1) # e0 : \n\ - addt $f12, $f17, $f15 # .. fa : $f15 = 1.5 \n\ - \n\ - subl $2, $1, $2 # e0 : \n\ - ldt $f14, $DN($4) # .. e1 : \n\ - sll $2, 32, $2 # e0 : \n\ - stq $2, $Y($sp) # e0 : \n\ - \n\ - ldt $f13, $Y($sp) # e0 : \n\ - mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y \n\ - mult $f10, $f13, $f10 # fm 4: $f10 = ((x*0.5)*y)*y \n\ - subt $f15, $f10, $f1 # fa 4: $f1 = (1.5-0.5*x*y*y) \n\ - \n\ - mult $f13, $f1, $f13 # fm 4: yp = y*(1.5-0.5*x*y^2)\n\ - mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp \n\ - mult $f1, $f13, $f11 # fm 4: $f11 = (x*0.5*yp)*yp \n\ - subt $f18, $f11, $f1 # fa 4: $f1=(1.5-2^-30)-x/2*yp^2\n\ - \n\ - mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1 \n\ - subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5) \n\ - ldt $f15, $UP($4) # .. e0 : \n\ - mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp \n\ - \n\ - mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp \n\ - mult $f10, $f12, $f12 # fm : $f12 = z*0.5 \n\ - subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp \n\ - mult $f12, $f1, $f12 # fm 4: $f12 = z/2*(1 - z*ypp)\n\ - \n\ - addt $f10, $f12, $f0 # fa 4: zp=res= z+z/2*(1-z*ypp)\n\ - mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN \n\ - mult/c $f0, $f15, $f11 # fm : zpl = zp * UP \n\ - mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi \n\ - \n\ - mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl \n\ - subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x \n\ - subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x \n\ - fcmovge $f13, $f12, $f0 # fa 3: res = (y1>=0)?zmi:res \n\ - \n\ - fcmovlt $f14, $f11, $f0 # fa 4: res = (y2<0)?zpl:res \n\ - addq $sp, 16, $sp # .. e0 : \n\ - ret # .. e1 : \n\ - \n\ - .align 4 \n\ -$fixup: \n\ - addq $sp, 16, $sp \n\ - br __full_ieee754_sqrt !samegp \n\ - \n\ - .end __ieee754_sqrt"); - -static double __full_ieee754_sqrt(double) __attribute_used__; -#define __ieee754_sqrt __full_ieee754_sqrt - -#endif /* _IEEE_FP_INEXACT */ - -#include <sysdeps/ieee754/dbl-64/e_sqrt.c> diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c deleted file mode 100644 index b7176e0979..0000000000 --- a/sysdeps/alpha/fpu/fclrexcpt.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Clear given exceptions in current floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -__feclearexcept (int excepts) -{ - unsigned long int swcr; - - /* Get the current state. */ - swcr = __ieee_get_fp_control (); - - /* Clear the relevant bits. */ - swcr &= ~((unsigned long int) excepts & SWCR_STATUS_MASK); - - /* Put the new state in effect. */ - __ieee_set_fp_control (swcr); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feclearexcept, __old_feclearexcept) -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); -#endif - -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c deleted file mode 100644 index 98c33ca842..0000000000 --- a/sysdeps/alpha/fpu/fedisblxcpt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Disable floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek <jakub@redhat.com>, 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -fedisableexcept (int excepts) -{ - unsigned long int new_exc, old_exc; - - new_exc = __ieee_get_fp_control (); - - old_exc = (new_exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT; - new_exc &= ~((excepts >> SWCR_ENABLE_SHIFT) & SWCR_ENABLE_MASK); - - __ieee_set_fp_control (new_exc); - - return old_exc; -} diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c deleted file mode 100644 index 80d657e4bd..0000000000 --- a/sysdeps/alpha/fpu/feenablxcpt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Enable floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek <jakub@redhat.com>, 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -feenableexcept (int excepts) -{ - unsigned long int new_exc, old_exc; - - new_exc = __ieee_get_fp_control (); - - old_exc = (new_exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT; - new_exc |= (excepts >> SWCR_ENABLE_SHIFT) & SWCR_ENABLE_MASK; - - __ieee_set_fp_control (new_exc); - - return old_exc; -} diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c deleted file mode 100644 index c1950fa3b9..0000000000 --- a/sysdeps/alpha/fpu/fegetenv.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Store current floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -__fegetenv (fenv_t *envp) -{ - unsigned long int fpcr; - unsigned long int swcr; - - /* Get status from software and hardware. Note that we don't need an - excb because the callsys is an implied trap barrier. */ - swcr = __ieee_get_fp_control (); - __asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr)); - - /* Merge the two bits of information. */ - *envp = ((fpcr & FPCR_ROUND_MASK) | (swcr & SWCR_ALL_MASK)); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c deleted file mode 100644 index ccc79e405d..0000000000 --- a/sysdeps/alpha/fpu/fegetexcept.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Get enabled floating-point exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek <jakub@redhat.com>, 2000. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -fegetexcept (void) -{ - unsigned long int exc; - - exc = __ieee_get_fp_control (); - - return (exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT; -} diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c deleted file mode 100644 index 995aee80da..0000000000 --- a/sysdeps/alpha/fpu/fegetround.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Return current rounding direction. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -fegetround (void) -{ - unsigned long fpcr; - - __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); - - return (fpcr >> FPCR_ROUND_SHIFT) & 3; -} diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c deleted file mode 100644 index 79aa970ac0..0000000000 --- a/sysdeps/alpha/fpu/feholdexcpt.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -feholdexcept (fenv_t *envp) -{ - /* Save the current state. */ - fegetenv(envp); - - /* Clear all exception status bits and exception enable bits. */ - __ieee_set_fp_control(*envp & SWCR_MAP_MASK); - - return 0; -} -libm_hidden_def (feholdexcept) diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/sysdeps/alpha/fpu/fenv_libc.h deleted file mode 100644 index f1d187d9e2..0000000000 --- a/sysdeps/alpha/fpu/fenv_libc.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Internal libc stuff for floating point environment routines. - Copyright (C) 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FENV_LIBC_H -#define _FENV_LIBC_H 1 - -#include <fenv.h> - -#define FPCR_ROUND_MASK (3UL << 58) -#define FPCR_ROUND_SHIFT 58 - -#define SWCR_MAP_MASK (3UL << 12) -#define SWCR_ENABLE_SHIFT 16 -#define SWCR_ENABLE_MASK (FE_ALL_EXCEPT >> SWCR_ENABLE_SHIFT) -#define SWCR_STATUS_MASK (FE_ALL_EXCEPT) -#define SWCR_ALL_MASK (SWCR_ENABLE_MASK \ - | SWCR_MAP_MASK \ - | SWCR_STATUS_MASK) - -#endif /* fenv_libc.h */ diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c deleted file mode 100644 index c76e882891..0000000000 --- a/sysdeps/alpha/fpu/fesetenv.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Install given floating-point environment. - Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -__fesetenv (const fenv_t *envp) -{ - unsigned long int fpcr; - fenv_t env; - - /* Magic encoding of default values: high bit set (never possible for a - user-space address) is not indirect. And we don't even have to get - rid of it since we mask things around just below. */ - if ((long int) envp >= 0) - env = *envp; - else - env = (unsigned long int) envp; - - /* Reset the rounding mode with the hardware fpcr. Note that the following - system call is an implied trap barrier for our modification. */ - __asm__ __volatile__ ("excb; mf_fpcr %0" : "=f" (fpcr)); - fpcr = (fpcr & ~FPCR_ROUND_MASK) | (env & FPCR_ROUND_MASK); - __asm__ __volatile__ ("mt_fpcr %0" : : "f" (fpcr)); - - /* Reset the exception status and mask with the kernel's FP code. */ - __ieee_set_fp_control (env & SWCR_ALL_MASK); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c deleted file mode 100644 index 54b2bcf673..0000000000 --- a/sysdeps/alpha/fpu/fesetround.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Set current rounding direction. - Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -fesetround (int round) -{ - unsigned long fpcr; - - if (round & ~3) - return 1; - - /* Get the current state. */ - __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); - - /* Set the relevant bits. */ - fpcr = ((fpcr & ~FPCR_ROUND_MASK) - | ((unsigned long)round << FPCR_ROUND_SHIFT)); - - /* Put the new state in effect. */ - __asm__ __volatile__("mt_fpcr %0; excb" : : "f"(fpcr)); - - return 0; -} -libm_hidden_def (fesetround) diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c deleted file mode 100644 index c798070bbb..0000000000 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Install given floating-point environment and raise exceptions. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -__feupdateenv (const fenv_t *envp) -{ - unsigned long int tmp; - - /* Get the current exception state. */ - tmp = __ieee_get_fp_control (); - - /* Install new environment. */ - fesetenv (envp); - - /* Raise the saved exception. Incidently for us the implementation - defined format of the values in objects of type fexcept_t is the - same as the ones specified using the FE_* constants. */ - feraiseexcept (tmp & SWCR_STATUS_MASK); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feupdateenv, __old_feupdateenv) -compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); -#endif - -versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c deleted file mode 100644 index c28e913359..0000000000 --- a/sysdeps/alpha/fpu/fgetexcptflg.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Store current representation for exceptions. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -__fegetexceptflag (fexcept_t *flagp, int excepts) -{ - unsigned long int tmp; - - /* Get the current state. */ - tmp = __ieee_get_fp_control(); - - /* Return that portion that corresponds to the requested exceptions. */ - *flagp = tmp & excepts & SWCR_STATUS_MASK; - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetexceptflag, __old_fegetexceptflag) -compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h deleted file mode 100644 index 28acdf1704..0000000000 --- a/sysdeps/alpha/fpu/fpu_control.h +++ /dev/null @@ -1,106 +0,0 @@ -/* FPU control word bits. Alpha-mapped-to-Intel version. - Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Olaf Flebbe. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _ALPHA_FPU_CONTROL_H -#define _ALPHA_FPU_CONTROL_H - -/* - * Since many programs seem to hardcode the values passed to __setfpucw() - * (rather than using the manifest constants) we emulate the x87 interface - * here (at least where this makes sense). - * - * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 - * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM - * - * IM: Invalid operation mask - * DM: Denormalized operand mask - * ZM: Zero-divide mask - * OM: Overflow mask - * UM: Underflow mask - * PM: Precision (inexact result) mask - * - * Mask bit is 1 means no interrupt. - * - * PC: Precision control - * 11 - round to extended precision - * 10 - round to double precision - * 00 - round to single precision - * - * RC: Rounding control - * 00 - rounding to nearest - * 01 - rounding down (toward - infinity) - * 10 - rounding up (toward + infinity) - * 11 - rounding toward zero - * - * IC: Infinity control - * That is for 8087 and 80287 only. - * - * The hardware default is 0x037f. I choose 0x1372. - */ - -#include <features.h> - -/* masking of interrupts */ -#define _FPU_MASK_IM 0x01 -#define _FPU_MASK_DM 0x02 -#define _FPU_MASK_ZM 0x04 -#define _FPU_MASK_OM 0x08 -#define _FPU_MASK_UM 0x10 -#define _FPU_MASK_PM 0x20 - -/* precision control -- without effect on Alpha */ -#define _FPU_EXTENDED 0x300 /* RECOMMENDED */ -#define _FPU_DOUBLE 0x200 -#define _FPU_SINGLE 0x0 /* DO NOT USE */ - -/* - * rounding control---notice that on the Alpha this affects only - * instructions with the dynamic rounding mode qualifier (/d). - */ -#define _FPU_RC_NEAREST 0x000 /* RECOMMENDED */ -#define _FPU_RC_DOWN 0x400 -#define _FPU_RC_UP 0x800 -#define _FPU_RC_ZERO 0xC00 - -#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */ - - -/* Now two recommended cw */ - -/* Linux default: - - extended precision - - rounding to positive infinity. There is no /p instruction - qualifier. By setting the dynamic rounding mode to +infinity, - one can use /d to get round to +infinity with no extra overhead - (so long as the default isn't changed, of course...) - - no exceptions enabled. */ - -#define _FPU_DEFAULT 0x137f - -/* IEEE: same as above. */ -#define _FPU_IEEE 0x137f - -/* Type of the control word. */ -typedef unsigned int fpu_control_t; - -/* Default control word set at startup. */ -extern fpu_control_t __fpu_control; - -#endif /* _ALPHA_FPU_CONTROL */ diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c deleted file mode 100644 index d198731861..0000000000 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Set floating-point environment exception handling. - Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -__fesetexceptflag (const fexcept_t *flagp, int excepts) -{ - unsigned long int tmp; - - /* Get the current exception state. */ - tmp = __ieee_get_fp_control (); - - /* Set all the bits that were called for. */ - tmp = (tmp & ~SWCR_STATUS_MASK) | (*flagp & excepts & SWCR_STATUS_MASK); - - /* And store it back. */ - __ieee_set_fp_control (tmp); - - /* Success. */ - return 0; -} - -#include <shlib-compat.h> -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c deleted file mode 100644 index a4b3081875..0000000000 --- a/sysdeps/alpha/fpu/ftestexcept.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Test exception in current environment. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson <rth@tamu.edu>, 1997. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <fenv_libc.h> - -int -fetestexcept (int excepts) -{ - unsigned long tmp; - - /* Get current exceptions. */ - tmp = __ieee_get_fp_control(); - - return tmp & excepts & SWCR_STATUS_MASK; -} diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps deleted file mode 100644 index d9df631d7c..0000000000 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ /dev/null @@ -1,1245 +0,0 @@ -# Begin of automatic generation - -# atan2 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -ildouble: 1 -ldouble: 1 -Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# atanh -Test "atanh (0.75) == 0.972955074527656652552676371721589865": -float: 1 -ifloat: 1 - -# cacos -Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": -ildouble: 1 -ldouble: 1 - -# cacosh -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# casin -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -ildouble: 1 -ldouble: 1 - -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -ildouble: 2 -ldouble: 2 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# catan -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -ildouble: 1 -ldouble: 1 - -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -double: 4 -idouble: 4 -Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -ildouble: 1 -ldouble: 1 - -# cbrt -Test "cbrt (-0.001) == -0.1": -ildouble: 1 -ldouble: 1 -Test "cbrt (-27.0) == -3.0": -double: 1 -idouble: 1 -Test "cbrt (0.75) == 0.908560296416069829445605878163630251": -double: 1 -idouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": -double: 1 -idouble: 1 - -# ccos -Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -float: 1 -ifloat: 1 - -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 - -# cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -ildouble: 1 -ldouble: 1 - -# clog -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": -double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# cpow -Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -ildouble: 4 -ldouble: 4 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": -double: 2 -float: 3 -idouble: 2 -ifloat: 3 -ildouble: 10 -ldouble: 10 -Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": -ildouble: 2 -ldouble: 2 -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -ildouble: 3 -ldouble: 3 -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -float: 2 -ifloat: 2 -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# csin -Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": -ildouble: 1 -ldouble: 1 - -# csinh -Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -double: 1 -idouble: 1 -Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 - -# csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": -ildouble: 1 -ldouble: 1 - -# ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 - -# ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -float: 1 -ifloat: 1 -Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": -double: 1 -idouble: 1 - -# erf -Test "erf (1.25) == 0.922900128256458230136523481197281140": -double: 1 -idouble: 1 - -# erfc -Test "erfc (2.0) == 0.00467773498104726583793074363274707139": -double: 1 -idouble: 1 -Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318": -ildouble: 1 -ldouble: 1 -Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": -double: 1 -idouble: 1 - -# exp10 -Test "exp10 (-1) == 0.1": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# exp2 -Test "exp2 (10) == 1024": -ildouble: 2 -ldouble: 2 - -# expm1 -Test "expm1 (0.75) == 1.11700001661267466854536981983709561": -double: 1 -idouble: 1 -Test "expm1 (1) == M_El - 1.0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# gamma -Test "gamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 - -# hypot -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 - -# j0 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "j0 (2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# j1 -Test "j1 (-1.0) == -0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "j1 (0.75) == 0.349243602174862192523281016426251335": -ildouble: 1 -ldouble: 1 -Test "j1 (1.0) == 0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "j1 (10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "j1 (2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "j1 (8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 -ildouble: 4 -ldouble: 4 - -# jn -Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "jn (1, 0.75) == 0.349243602174862192523281016426251335": -ildouble: 1 -ldouble: 1 -Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 -ildouble: 4 -ldouble: 4 -Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": -ildouble: 1 -ldouble: 1 -Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 -ildouble: 2 -ldouble: 2 -Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": -float: 4 -ifloat: 4 -Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -# lgamma -Test "lgamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "log10 (e) == log10(e)": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": -float: 1 -ifloat: 1 - -# log2 -Test "log2 (0.75) == -.415037499278843818546261056052183492": -ildouble: 1 -ldouble: 1 - -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -float: 1 -ifloat: 1 - -# sqrt -Test "sqrt (2) == M_SQRT2l": -ildouble: 1 -ldouble: 1 - -# tanh -Test "tanh (-0.75) == -0.635148952387287319214434357312496495": -ildouble: 1 -ldouble: 1 -Test "tanh (-1.0) == -0.7615941559557648881194582826047935904": -ildouble: 1 -ldouble: 1 -Test "tanh (0.75) == 0.635148952387287319214434357312496495": -ildouble: 1 -ldouble: 1 -Test "tanh (1.0) == 0.7615941559557648881194582826047935904": -ildouble: 1 -ldouble: 1 - -# tgamma -Test "tgamma (-0.5) == -2 sqrt (pi)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "tgamma (0.5) == sqrt (pi)": -float: 1 -ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568117117915281162": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "tgamma (4) == 6": -ildouble: 1 -ldouble: 1 - -# y0 -Test "y0 (1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "y0 (8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -# y1 -Test "y1 (0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "y1 (0.75) == -1.03759455076928541973767132140642198": -ildouble: 1 -ldouble: 1 -Test "y1 (1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "y1 (10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "y1 (2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "y1 (8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# yn -Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": -ildouble: 1 -ldouble: 1 -Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "yn (10, 0.125) == -127057845771019398.252538486899753195": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 5 -ldouble: 5 -Test "yn (10, 1.0) == -121618014.278689189288130426667971145": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "yn (10, 2.0) == -129184.542208039282635913145923304214": -double: 2 -idouble: 2 -ildouble: 2 -ldouble: 2 -Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": -double: 1 -idouble: 1 -Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": -double: 1 -idouble: 1 - -# Maximal error of functions: -Function: "atan2": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "atanh": -float: 1 -ifloat: 1 - -Function: Imaginary part of "cacos": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "cacosh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "casin": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "casin": -ildouble: 1 -ldouble: 1 - -Function: Real part of "casinh": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 -ildouble: 4 -ldouble: 4 - -Function: Imaginary part of "casinh": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -ildouble: 2 -ldouble: 2 - -Function: Imaginary part of "catan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "catanh": -double: 4 -idouble: 4 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "catanh": -ildouble: 1 -ldouble: 1 - -Function: "cbrt": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ccos": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccosh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ccosh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog10": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "cos": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cpow": -double: 2 -float: 4 -idouble: 2 -ifloat: 4 -ildouble: 10 -ldouble: 10 - -Function: Imaginary part of "cpow": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: Real part of "csin": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csin": -ildouble: 1 -ldouble: 1 - -Function: Real part of "csinh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "csqrt": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csqrt": -ildouble: 1 -ldouble: 1 - -Function: Real part of "ctan": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ctan": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 - -Function: Real part of "ctanh": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "erf": -double: 1 -idouble: 1 - -Function: "erfc": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "exp2": -ildouble: 2 -ldouble: 2 - -Function: "expm1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "gamma": -ildouble: 1 -ldouble: 1 - -Function: "hypot": -float: 1 -ifloat: 1 - -Function: "j0": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 - -Function: "j1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 4 -ldouble: 4 - -Function: "jn": -double: 4 -float: 4 -idouble: 4 -ifloat: 4 -ildouble: 4 -ldouble: 4 - -Function: "lgamma": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "log10": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "log1p": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "log2": -ildouble: 1 -ldouble: 1 - -Function: "sincos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "sqrt": -ildouble: 1 -ldouble: 1 - -Function: "tan": -double: 1 -idouble: 1 - -Function: "tanh": -ildouble: 1 -ldouble: 1 - -Function: "tgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "y0": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -Function: "y1": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "yn": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 5 -ldouble: 5 - -# end of automatic generation diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c deleted file mode 100644 index 46dca5aeb8..0000000000 --- a/sysdeps/alpha/fpu/s_cacosf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return arc cosine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cacosf __cacosf_not_defined -#define cacosf cacosf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __cacosf -#undef cacosf -#define __cacosf internal_cacosf - -static _Complex float internal_cacosf (_Complex float x); - -#include <math/s_cacosf.c> -#include "cfloat-compat.h" - -#undef __cacosf - -c1_cfloat_rettype -__c1_cacosf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_cacosf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_cacosf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_cacosf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (cacosf); diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c deleted file mode 100644 index 6b61d1ddaa..0000000000 --- a/sysdeps/alpha/fpu/s_cacoshf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return arc hyperbole cosine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cacoshf __cacoshf_not_defined -#define cacoshf cacoshf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __cacoshf -#undef cacoshf -#define __cacoshf internal_cacoshf - -static _Complex float internal_cacoshf (_Complex float x); - -#include <math/s_cacoshf.c> -#include "cfloat-compat.h" - -#undef __cacoshf - -c1_cfloat_rettype -__c1_cacoshf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_cacoshf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_cacoshf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_cacoshf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (cacoshf); diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c deleted file mode 100644 index fd41042ec9..0000000000 --- a/sysdeps/alpha/fpu/s_casinf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return arc sine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __casinf __casinf_not_defined -#define casinf casinf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __casinf -#undef casinf -#define __casinf internal_casinf - -static _Complex float internal_casinf (_Complex float x); - -#include <math/s_casinf.c> -#include "cfloat-compat.h" - -#undef __casinf - -c1_cfloat_rettype -__c1_casinf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_casinf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_casinf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_casinf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (casinf); diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c deleted file mode 100644 index 0b72a24d5a..0000000000 --- a/sysdeps/alpha/fpu/s_casinhf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return arc hyperbole sine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __casinhf __casinhf_not_defined -#define casinhf casinhf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __casinhf -#undef casinhf -#define __casinhf internal_casinhf - -static _Complex float internal_casinhf (_Complex float x); - -#include <math/s_casinhf.c> -#include "cfloat-compat.h" - -#undef __casinhf - -c1_cfloat_rettype -__c1_casinhf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_casinhf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_casinhf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_casinhf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (casinhf); diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c deleted file mode 100644 index 8f40616617..0000000000 --- a/sysdeps/alpha/fpu/s_catanf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return arc tangent of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __catanf __catanf_not_defined -#define catanf catanf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __catanf -#undef catanf -#define __catanf internal_catanf - -static _Complex float internal_catanf (_Complex float x); - -#include <math/s_catanf.c> -#include "cfloat-compat.h" - -#undef __catanf - -c1_cfloat_rettype -__c1_catanf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_catanf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_catanf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_catanf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (catanf); diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c deleted file mode 100644 index ac11945727..0000000000 --- a/sysdeps/alpha/fpu/s_catanhf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return arc hyperbole tangent of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __catanhf __catanhf_not_defined -#define catanhf catanhf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __catanhf -#undef catanhf -#define __catanhf internal_catanhf - -static _Complex float internal_catanhf (_Complex float x); - -#include <math/s_catanhf.c> -#include "cfloat-compat.h" - -#undef __catanhf - -c1_cfloat_rettype -__c1_catanhf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_catanhf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_catanhf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_catanhf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (catanhf); diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c deleted file mode 100644 index 04036f4613..0000000000 --- a/sysdeps/alpha/fpu/s_ccosf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return cosine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __ccosf __ccosf_not_defined -#define ccosf ccosf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __ccosf -#undef ccosf -#define __ccosf internal_ccosf - -static _Complex float internal_ccosf (_Complex float x); - -#include <math/s_ccosf.c> -#include "cfloat-compat.h" - -#undef __ccosf - -c1_cfloat_rettype -__c1_ccosf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_ccosf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_ccosf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_ccosf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (ccosf); diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c deleted file mode 100644 index e9fb34ce47..0000000000 --- a/sysdeps/alpha/fpu/s_ccoshf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return hyperbole cosine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __ccoshf __ccoshf_not_defined -#define ccoshf ccoshf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __ccoshf -#undef ccoshf -#define __ccoshf internal_ccoshf - -static _Complex float internal_ccoshf (_Complex float x); - -#include <math/s_ccoshf.c> -#include "cfloat-compat.h" - -#undef __ccoshf - -c1_cfloat_rettype -__c1_ccoshf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_ccoshf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_ccoshf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_ccoshf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (ccoshf); diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c deleted file mode 100644 index 40c2379286..0000000000 --- a/sysdeps/alpha/fpu/s_ceil.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1998, 2000, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - -/* Use the -inf rounding mode conversion instructions to implement - ceil, via something akin to -floor(-x). This is much faster than - playing with the fpcr to achieve +inf rounding mode. */ - -double -__ceil (double x) -{ - double two52 = copysign (0x1.0p52, x); - double r, tmp; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0" -#else - "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(-x), "f"(-two52)); - - /* Fix up the negation we did above, as well as handling -0 properly. */ - return copysign (r, x); -} - -weak_alias (__ceil, ceil) -#ifdef NO_LONG_DOUBLE -strong_alias (__ceil, __ceill) -weak_alias (__ceil, ceill) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __ceil, ceill, GLIBC_2_0); -#endif diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c deleted file mode 100644 index 0df651f405..0000000000 --- a/sysdeps/alpha/fpu/s_ceilf.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1998, 2000, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -/* Use the -inf rounding mode conversion instructions to implement - ceil, via something akin to -floor(-x). This is much faster than - playing with the fpcr to achieve +inf rounding mode. */ - -float -__ceilf (float x) -{ - float two23 = copysignf (0x1.0p23, x); - float r, tmp; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0" -#else - "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(-x), "f"(-two23)); - - /* Fix up the negation we did above, as well as handling -0 properly. */ - return copysignf (r, x); -} - -weak_alias (__ceilf, ceilf) diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c deleted file mode 100644 index 4a28dcd9bf..0000000000 --- a/sysdeps/alpha/fpu/s_cexpf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return exponent of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cexpf __cexpf_not_defined -#define cexpf cexpf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __cexpf -#undef cexpf -#define __cexpf internal_cexpf - -static _Complex float internal_cexpf (_Complex float x); - -#include <math/s_cexpf.c> -#include "cfloat-compat.h" - -#undef __cexpf - -c1_cfloat_rettype -__c1_cexpf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_cexpf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_cexpf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_cexpf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (cexpf); diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c deleted file mode 100644 index e7dc7bb23f..0000000000 --- a/sysdeps/alpha/fpu/s_clog10f.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Return base 10 logarithm of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __clog10f __clog10f_not_defined -#define clog10f clog10f_not_defined - -#include <complex.h> -#include <math.h> - -#undef __clog10f -#undef clog10f -#define __clog10f internal_clog10f - -static _Complex float internal_clog10f (_Complex float x); - -#include <math/s_clog10f.c> -#include "cfloat-compat.h" - -#undef __clog10f - -c1_cfloat_rettype -__c1_clog10f (c1_cfloat_decl (x)) -{ - _Complex float r = internal_clog10f (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_clog10f (c2_cfloat_decl (x)) -{ - _Complex float r = internal_clog10f (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -/* Ug. __clog10f was exported from GLIBC_2.1. This is the only - complex function whose double-underscore symbol was exported, - so we get to handle that specially. */ -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_4) -strong_alias (__c1_clog10f, __c1_clog10f_2); -compat_symbol (libm, __c1_clog10f, clog10f, GLIBC_2_1); -compat_symbol (libm, __c1_clog10f_2, __clog10f, GLIBC_2_1); -#endif -versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_4); -extern typeof(__c2_clog10f) __clog10f attribute_hidden; -strong_alias (__c2_clog10f, __clog10f) diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c deleted file mode 100644 index 364dcec883..0000000000 --- a/sysdeps/alpha/fpu/s_clogf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return natural logarithm of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __clogf __clogf_not_defined -#define clogf clogf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __clogf -#undef clogf -#define __clogf internal_clogf - -static _Complex float internal_clogf (_Complex float x); - -#include <math/s_clogf.c> -#include "cfloat-compat.h" - -#undef __clogf - -c1_cfloat_rettype -__c1_clogf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_clogf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_clogf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_clogf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (clogf); diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c deleted file mode 100644 index 52c632ec4c..0000000000 --- a/sysdeps/alpha/fpu/s_copysign.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - -double -__copysign (double x, double y) -{ - __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); - return x; -} - -weak_alias (__copysign, copysign) -#ifdef NO_LONG_DOUBLE -strong_alias (__copysign, __copysignl) -weak_alias (__copysign, copysignl) -#endif -#ifdef IS_IN_libm -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __copysign, copysignl, GLIBC_2_0); -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) -compat_symbol (libc, __copysign, copysignl, GLIBC_2_0); -#endif diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/sysdeps/alpha/fpu/s_copysignf.c deleted file mode 100644 index f4b846bcbe..0000000000 --- a/sysdeps/alpha/fpu/s_copysignf.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -float -__copysignf (float x, float y) -{ - __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); - return x; -} - -weak_alias (__copysignf, copysignf) diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c deleted file mode 100644 index cc61b1895e..0000000000 --- a/sysdeps/alpha/fpu/s_cpowf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return power of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cpowf __cpowf_not_defined -#define cpowf cpowf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __cpowf -#undef cpowf -#define __cpowf internal_cpowf - -static _Complex float internal_cpowf (_Complex float x, _Complex float c); - -#include <math/s_cpowf.c> -#include "cfloat-compat.h" - -#undef __cpowf - -c1_cfloat_rettype -__c1_cpowf (c1_cfloat_decl (x), c1_cfloat_decl (c)) -{ - _Complex float r = internal_cpowf (c1_cfloat_value (x), c1_cfloat_value (c)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_cpowf (c2_cfloat_decl (x), c2_cfloat_decl (c)) -{ - _Complex float r = internal_cpowf (c2_cfloat_value (x), c2_cfloat_value (c)); - return c2_cfloat_return (r); -} - -cfloat_versions (cpowf); diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c deleted file mode 100644 index 5cfb526679..0000000000 --- a/sysdeps/alpha/fpu/s_cprojf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return projection of complex float value to Riemann sphere. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __cprojf __cprojf_not_defined -#define cprojf cprojf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __cprojf -#undef cprojf -#define __cprojf internal_cprojf - -static _Complex float internal_cprojf (_Complex float x); - -#include <math/s_cprojf.c> -#include "cfloat-compat.h" - -#undef __cprojf - -c1_cfloat_rettype -__c1_cprojf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_cprojf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_cprojf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_cprojf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (cprojf); diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c deleted file mode 100644 index 8eb9a1019d..0000000000 --- a/sysdeps/alpha/fpu/s_csinf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return sine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __csinf __csinf_not_defined -#define csinf csinf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __csinf -#undef csinf -#define __csinf internal_csinf - -static _Complex float internal_csinf (_Complex float x); - -#include <math/s_csinf.c> -#include "cfloat-compat.h" - -#undef __csinf - -c1_cfloat_rettype -__c1_csinf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_csinf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_csinf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_csinf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (csinf); diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c deleted file mode 100644 index 0e2c186740..0000000000 --- a/sysdeps/alpha/fpu/s_csinhf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return hyperbole sine of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __csinhf __csinhf_not_defined -#define csinhf csinhf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __csinhf -#undef csinhf -#define __csinhf internal_csinhf - -static _Complex float internal_csinhf (_Complex float x); - -#include <math/s_csinhf.c> -#include "cfloat-compat.h" - -#undef __csinhf - -c1_cfloat_rettype -__c1_csinhf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_csinhf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_csinhf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_csinhf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (csinhf); diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c deleted file mode 100644 index ebf23a828e..0000000000 --- a/sysdeps/alpha/fpu/s_csqrtf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return square root of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __csqrtf __csinhf_not_defined -#define csqrtf csqrtf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __csqrtf -#undef csqrtf -#define __csqrtf internal_csqrtf - -static _Complex float internal_csqrtf (_Complex float x); - -#include <math/s_csqrtf.c> -#include "cfloat-compat.h" - -#undef __csqrtf - -c1_cfloat_rettype -__c1_csqrtf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_csqrtf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_csqrtf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_csqrtf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (csqrtf); diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c deleted file mode 100644 index e26db963e4..0000000000 --- a/sysdeps/alpha/fpu/s_ctanf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return tangent of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __ctanf __ctanf_not_defined -#define ctanf ctanf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __ctanf -#undef ctanf -#define __ctanf internal_ctanf - -static _Complex float internal_ctanf (_Complex float x); - -#include <math/s_ctanf.c> -#include "cfloat-compat.h" - -#undef __ctanf - -c1_cfloat_rettype -__c1_ctanf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_ctanf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_ctanf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_ctanf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (ctanf); diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c deleted file mode 100644 index 5d047bd460..0000000000 --- a/sysdeps/alpha/fpu/s_ctanhf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Return hyperbole tangent of complex float value. - Copyright (C) 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __ctanhf __ctanhf_not_defined -#define ctanhf ctanhf_not_defined - -#include <complex.h> -#include <math.h> - -#undef __ctanhf -#undef ctanhf -#define __ctanhf internal_ctanhf - -static _Complex float internal_ctanhf (_Complex float x); - -#include <math/s_ctanhf.c> -#include "cfloat-compat.h" - -#undef __ctanhf - -c1_cfloat_rettype -__c1_ctanhf (c1_cfloat_decl (x)) -{ - _Complex float r = internal_ctanhf (c1_cfloat_value (x)); - return c1_cfloat_return (r); -} - -c2_cfloat_rettype -__c2_ctanhf (c2_cfloat_decl (x)) -{ - _Complex float r = internal_ctanhf (c2_cfloat_value (x)); - return c2_cfloat_return (r); -} - -cfloat_versions (ctanhf); diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c deleted file mode 100644 index 9bc42f68d0..0000000000 --- a/sysdeps/alpha/fpu/s_fabs.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - -double -__fabs (double x) -{ -#if __GNUC_PREREQ (2, 8) - return __builtin_fabs (x); -#else - __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; -#endif -} - -weak_alias (__fabs, fabs) -#ifdef NO_LONG_DOUBLE -strong_alias (__fabs, __fabsl) -weak_alias (__fabs, fabsl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __fabs, fabsl, GLIBC_2_0); -#endif diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/sysdeps/alpha/fpu/s_fabsf.c deleted file mode 100644 index 35e16bf65d..0000000000 --- a/sysdeps/alpha/fpu/s_fabsf.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -float -__fabsf (float x) -{ -#if __GNUC_PREREQ (2, 8) - return __builtin_fabsf (x); -#else - __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; -#endif -} - -weak_alias (__fabsf, fabsf) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c deleted file mode 100644 index 5af6386155..0000000000 --- a/sysdeps/alpha/fpu/s_floor.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1998, 1999, 2000, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - - -/* Use the -inf rounding mode conversion instructions to implement floor. */ - -double -__floor (double x) -{ - double two52 = copysign (0x1.0p52, x); - double r, tmp; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0" -#else - "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(x), "f"(two52)); - - /* floor(-0) == -0, and in general we'll always have the same - sign as our input. */ - return copysign (r, x); -} - -weak_alias (__floor, floor) -#ifdef NO_LONG_DOUBLE -strong_alias (__floor, __floorl) -weak_alias (__floor, floorl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __floor, floorl, GLIBC_2_0); -#endif diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c deleted file mode 100644 index 8b421705cd..0000000000 --- a/sysdeps/alpha/fpu/s_floorf.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - - -/* Use the -inf rounding mode conversion instructions to implement floor. */ - -float -__floorf (float x) -{ - float two23 = copysignf (0x1.0p23, x); - float r, tmp; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0" -#else - "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(x), "f"(two23)); - - /* floor(-0) == -0, and in general we'll always have the same - sign as our input. */ - return copysignf (r, x); -} - -weak_alias (__floorf, floorf) diff --git a/sysdeps/alpha/fpu/s_fmax.S b/sysdeps/alpha/fpu/s_fmax.S deleted file mode 100644 index d638eec805..0000000000 --- a/sysdeps/alpha/fpu/s_fmax.S +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#include <math_ldbl_opt.h> - - .set noat - .set noreorder - - .text -ENTRY (__fmax) - .prologue 0 - - cmptun/su $f16, $f16, $f10 - cmptun/su $f17, $f17, $f11 - fmov $f17, $f0 - unop - - trapb - fbne $f10, $ret - fmov $f16, $f0 - fbne $f11, $ret - - cmptlt/su $f16, $f17, $f11 - trapb - fcmovne $f11, $f17, $f0 -$ret: ret - -END (__fmax) - -/* Given the in-register format of single-precision, this works there too. */ -strong_alias (__fmax, __fmaxf) -weak_alias (__fmaxf, fmaxf) - -weak_alias (__fmax, fmax) -#ifdef NO_LONG_DOUBLE -strong_alias (__fmax, __fmaxl) -weak_alias (__fmaxl, fmaxl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1); -#endif diff --git a/sysdeps/alpha/fpu/s_fmaxf.S b/sysdeps/alpha/fpu/s_fmaxf.S deleted file mode 100644 index 3c2d62bb81..0000000000 --- a/sysdeps/alpha/fpu/s_fmaxf.S +++ /dev/null @@ -1 +0,0 @@ -/* __fmaxf is in s_fmax.c */ diff --git a/sysdeps/alpha/fpu/s_fmin.S b/sysdeps/alpha/fpu/s_fmin.S deleted file mode 100644 index d70fab625a..0000000000 --- a/sysdeps/alpha/fpu/s_fmin.S +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> -#include <math_ldbl_opt.h> - - .set noat - .set noreorder - - .text -ENTRY (__fmin) - .prologue 0 - - cmptun/su $f16, $f16, $f10 - cmptun/su $f17, $f17, $f11 - fmov $f17, $f0 - unop - - trapb - fbne $f10, $ret - fmov $f16, $f0 - fbne $f11, $ret - - cmptlt/su $f17, $f16, $f11 - trapb - fcmovne $f11, $f17, $f0 -$ret: ret - -END (__fmin) - -/* Given the in-register format of single-precision, this works there too. */ -strong_alias (__fmin, __fminf) -weak_alias (__fminf, fminf) - -weak_alias (__fmin, fmin) -#ifdef NO_LONG_DOUBLE -strong_alias (__fmin, __fminl) -weak_alias (__fminl, fminl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fmin, fminl, GLIBC_2_1); -#endif diff --git a/sysdeps/alpha/fpu/s_fminf.S b/sysdeps/alpha/fpu/s_fminf.S deleted file mode 100644 index 10ab7fe53c..0000000000 --- a/sysdeps/alpha/fpu/s_fminf.S +++ /dev/null @@ -1 +0,0 @@ -/* __fminf is in s_fmin.c */ diff --git a/sysdeps/alpha/fpu/s_isnan.c b/sysdeps/alpha/fpu/s_isnan.c deleted file mode 100644 index a9230329c5..0000000000 --- a/sysdeps/alpha/fpu/s_isnan.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Return 1 if argument is a NaN, else 0. - Copyright (C) 2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Ugly kludge to avoid declarations. */ -#define __isnanf not___isnanf -#define isnanf not_isnanf -#define __GI___isnanf not__GI___isnanf - -#include <math.h> -#include <math_ldbl_opt.h> - -#undef __isnanf -#undef isnanf -#undef __GI___isnanf - -/* The hidden_proto in include/math.h was obscured by the macro hackery. */ -__typeof (__isnan) __isnanf; -hidden_proto (__isnanf) - - -int -__isnan (double x) -{ - return isunordered (x, x); -} - -hidden_def (__isnan) -weak_alias (__isnan, isnan) - -/* It turns out that the 'double' version will also always work for - single-precision. */ -strong_alias (__isnan, __isnanf) -hidden_def (__isnanf) -weak_alias (__isnanf, isnanf) - -#ifdef NO_LONG_DOUBLE -strong_alias (__isnan, __isnanl) -weak_alias (__isnan, isnanl) -#endif -#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) -compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0); -compat_symbol (libc, isnan, isnanl, GLIBC_2_0); -#endif diff --git a/sysdeps/alpha/fpu/s_isnanf.c b/sysdeps/alpha/fpu/s_isnanf.c deleted file mode 100644 index af41e43850..0000000000 --- a/sysdeps/alpha/fpu/s_isnanf.c +++ /dev/null @@ -1 +0,0 @@ -/* In s_isnan.c */ diff --git a/sysdeps/alpha/fpu/s_llrint.c b/sysdeps/alpha/fpu/s_llrint.c deleted file mode 100644 index 5db97be037..0000000000 --- a/sysdeps/alpha/fpu/s_llrint.c +++ /dev/null @@ -1 +0,0 @@ -/* In s_lrint.c */ diff --git a/sysdeps/alpha/fpu/s_llrintf.c b/sysdeps/alpha/fpu/s_llrintf.c deleted file mode 100644 index 18f2885ef7..0000000000 --- a/sysdeps/alpha/fpu/s_llrintf.c +++ /dev/null @@ -1 +0,0 @@ -/* In s_lrintf.c */ diff --git a/sysdeps/alpha/fpu/s_llround.c b/sysdeps/alpha/fpu/s_llround.c deleted file mode 100644 index b212fbd8e5..0000000000 --- a/sysdeps/alpha/fpu/s_llround.c +++ /dev/null @@ -1 +0,0 @@ -/* In s_lround.c. */ diff --git a/sysdeps/alpha/fpu/s_llroundf.c b/sysdeps/alpha/fpu/s_llroundf.c deleted file mode 100644 index 73bdf3103f..0000000000 --- a/sysdeps/alpha/fpu/s_llroundf.c +++ /dev/null @@ -1 +0,0 @@ -/* In s_lroundf.c. */ diff --git a/sysdeps/alpha/fpu/s_lrint.c b/sysdeps/alpha/fpu/s_lrint.c deleted file mode 100644 index 1696408705..0000000000 --- a/sysdeps/alpha/fpu/s_lrint.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __llrint not___llrint -#define llrint not_llrint -#include <math.h> -#include <math_ldbl_opt.h> -#undef __llrint -#undef llrint - -long int -__lrint (double x) -{ - long ret; - - __asm ("cvttq/svd %1,%0" : "=&f"(ret) : "f"(x)); - - return ret; -} - -strong_alias (__lrint, __llrint) -weak_alias (__lrint, lrint) -weak_alias (__llrint, llrint) -#ifdef NO_LONG_DOUBLE -strong_alias (__lrint, __lrintl) -strong_alias (__lrint, __llrintl) -weak_alias (__lrintl, lrintl) -weak_alias (__llrintl, llrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lrint, lrintl, GLIBC_2_1); -compat_symbol (libm, __llrint, llrintl, GLIBC_2_1); -#endif diff --git a/sysdeps/alpha/fpu/s_lrintf.c b/sysdeps/alpha/fpu/s_lrintf.c deleted file mode 100644 index 20a6a6cf82..0000000000 --- a/sysdeps/alpha/fpu/s_lrintf.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __llrintf not___llrintf -#define llrintf not_llrintf -#include <math.h> -#undef __llrintf -#undef llrintf - -long int -__lrintf (float x) -{ - double tmp; - long ret; - - __asm ("cvtst/s %2,%1\n\tcvttq/svd %1,%0" - : "=&f"(ret), "=&f"(tmp) : "f"(x)); - - return ret; -} - -strong_alias (__lrintf, __llrintf) -weak_alias (__lrintf, lrintf) -weak_alias (__llrintf, llrintf) diff --git a/sysdeps/alpha/fpu/s_lround.c b/sysdeps/alpha/fpu/s_lround.c deleted file mode 100644 index 0e0e98806c..0000000000 --- a/sysdeps/alpha/fpu/s_lround.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __llround not___llround -#define llround not_llround -#include <math.h> -#include <math_ldbl_opt.h> -#undef __llround -#undef llround - -long int -__lround (double x) -{ - double adj; - - adj = 0x1.fffffffffffffp-2; /* nextafter (0.5, 0.0) */ - adj = copysign (adj, x); - return x + adj; -} - -strong_alias (__lround, __llround) -weak_alias (__lround, lround) -weak_alias (__llround, llround) -#ifdef NO_LONG_DOUBLE -strong_alias (__lround, __lroundl) -strong_alias (__lround, __llroundl) -weak_alias (__lroundl, lroundl) -weak_alias (__llroundl, llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lround, lroundl, GLIBC_2_1); -compat_symbol (libm, __llround, llroundl, GLIBC_2_1); -#endif diff --git a/sysdeps/alpha/fpu/s_lroundf.c b/sysdeps/alpha/fpu/s_lroundf.c deleted file mode 100644 index 16ff348b21..0000000000 --- a/sysdeps/alpha/fpu/s_lroundf.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __llroundf not___llroundf -#define llroundf not_llroundf -#include <math.h> -#undef __llroundf -#undef llroundf - - -long int -__lroundf (float x) -{ - float adj; - - adj = 0x1.fffffep-2; /* nextafterf (0.5f, 0.0f) */ - adj = copysignf (adj, x); - return x + adj; -} - -strong_alias (__lroundf, __llroundf) -weak_alias (__lroundf, lroundf) -weak_alias (__llroundf, llroundf) diff --git a/sysdeps/alpha/fpu/s_nearbyint.c b/sysdeps/alpha/fpu/s_nearbyint.c deleted file mode 100644 index b18db8ba79..0000000000 --- a/sysdeps/alpha/fpu/s_nearbyint.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - -#ifdef _IEEE_FP_INEXACT -#error "Don't compile with -mieee-with-inexact" -#endif - -double -__nearbyint (double x) -{ - double two52 = copysign (0x1.0p52, x); - double r; - - r = x + two52; - r = r - two52; - - /* nearbyint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); -} - -weak_alias (__nearbyint, nearbyint) -#ifdef NO_LONG_DOUBLE -strong_alias (__nearbyint, __nearbyintl) -weak_alias (__nearbyint, nearbyintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1); -#endif diff --git a/sysdeps/alpha/fpu/s_nearbyintf.c b/sysdeps/alpha/fpu/s_nearbyintf.c deleted file mode 100644 index ee637982df..0000000000 --- a/sysdeps/alpha/fpu/s_nearbyintf.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - -#ifdef _IEEE_FP_INEXACT -#error "Don't compile with -mieee-with-inexact" -#endif - -float -__nearbyintf (float x) -{ - float two23 = copysignf (0x1.0p23, x); - float r; - - r = x + two23; - r = r - two23; - - /* nearbyint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); -} - -weak_alias (__nearbyintf, nearbyintf) diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c deleted file mode 100644 index e9aa028822..0000000000 --- a/sysdeps/alpha/fpu/s_rint.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - - -double -__rint (double x) -{ - double two52 = copysign (0x1.0p52, x); - double r; - - r = x + two52; - r = r - two52; - - /* rint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); -} - -weak_alias (__rint, rint) -#ifdef NO_LONG_DOUBLE -strong_alias (__rint, __rintl) -weak_alias (__rint, rintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __rint, rintl, GLIBC_2_0); -#endif diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c deleted file mode 100644 index 9e4cbd1ffd..0000000000 --- a/sysdeps/alpha/fpu/s_rintf.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2000, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - - -float -__rintf (float x) -{ - float two23 = copysignf (0x1.0p23, x); - float r; - - r = x + two23; - r = r - two23; - - /* rint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); -} - -weak_alias (__rintf, rintf) diff --git a/sysdeps/alpha/fpu/s_round.c b/sysdeps/alpha/fpu/s_round.c deleted file mode 100644 index 71763cf4ab..0000000000 --- a/sysdeps/alpha/fpu/s_round.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - - -double -__round (double x) -{ - const double almost_half = 0x1.fffffffffffffp-2; - const double two52 = 0x1.0p52; - double tmp, r; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0" -#else - "addt/suc %2, %3, %1\n\tsubt/suc %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(fabs (x) + almost_half), "f"(two52)); - - return copysign (r, x); -} - -weak_alias (__round, round) -#ifdef NO_LONG_DOUBLE -strong_alias (__round, __roundl) -weak_alias (__roundl, roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1); -#endif diff --git a/sysdeps/alpha/fpu/s_roundf.c b/sysdeps/alpha/fpu/s_roundf.c deleted file mode 100644 index 89584f062b..0000000000 --- a/sysdeps/alpha/fpu/s_roundf.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - - -float -__roundf (float x) -{ - const float almost_half = 0x1.fffffep-2; - const float two23 = 0x1.0p23; - float r, tmp; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0" -#else - "adds/suc %2, %3, %1\n\tsubs/suc %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(fabsf (x) + almost_half), "f"(two23)); - - /* round(-0) == -0, and in general we'll always have the same - sign as our input. */ - return copysignf (r, x); -} - -weak_alias (__roundf, roundf) diff --git a/sysdeps/alpha/fpu/s_trunc.c b/sysdeps/alpha/fpu/s_trunc.c deleted file mode 100644 index 11a279a53f..0000000000 --- a/sysdeps/alpha/fpu/s_trunc.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> -#include <math_ldbl_opt.h> - - -/* Use the chopped rounding mode conversion instructions to implement trunc. */ - -double -__trunc (double x) -{ - double two52 = copysign (0x1.0p52, x); - double r, tmp; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0" -#else - "addt/suc %2, %3, %1\n\tsubt/suc %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(x), "f"(two52)); - - /* trunc(-0) == -0, and in general we'll always have the same - sign as our input. */ - return copysign (r, x); -} - -weak_alias (__trunc, trunc) -#ifdef NO_LONG_DOUBLE -strong_alias (__trunc, __truncl) -weak_alias (__trunc, truncl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __trunc, truncl, GLIBC_2_1); -#endif diff --git a/sysdeps/alpha/fpu/s_truncf.c b/sysdeps/alpha/fpu/s_truncf.c deleted file mode 100644 index 094997b433..0000000000 --- a/sysdeps/alpha/fpu/s_truncf.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <math.h> - - -/* Use the chopped rounding mode conversion instructions to implement trunc. */ - -float -__truncf (float x) -{ - float two23 = copysignf (0x1.0p23, x); - float r, tmp; - - __asm ( -#ifdef _IEEE_FP_INEXACT - "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0" -#else - "adds/suc %2, %3, %1\n\tsubs/suc %1, %3, %0" -#endif - : "=&f"(r), "=&f"(tmp) - : "f"(x), "f"(two23)); - - /* trunc(-0) == -0, and in general we'll always have the same - sign as our input. */ - return copysignf (r, x); -} - -weak_alias (__truncf, truncf) |